patch-2.4.18 linux/drivers/macintosh/rtc.c
Next file: linux/drivers/macintosh/via-cuda.c
Previous file: linux/drivers/macintosh/mediabay.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Wed Dec 26 16:32:31 2001
- Orig file:
linux.orig/drivers/macintosh/rtc.c
- Orig date:
Mon Feb 18 20:18:39 2002
diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/drivers/macintosh/rtc.c linux/drivers/macintosh/rtc.c
@@ -34,14 +34,13 @@
void get_rtc_time(struct rtc_time *t)
{
unsigned long nowtime;
-
+
nowtime = (ppc_md.get_rtc_time)();
to_tm(nowtime, t);
t->tm_year -= 1900;
- t->tm_mon -= 1;
- t->tm_wday -= 1;
+ t->tm_mon -= 1; /* Make sure userland has a 0-based month */
}
/* Set the current date and time in the real time clock. */
@@ -49,7 +48,8 @@
{
unsigned long nowtime;
- nowtime = mktime(t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
+ nowtime = mktime(t->tm_year+1900, t->tm_mon+1, t->tm_mday,
+ t->tm_hour, t->tm_min, t->tm_sec);
(ppc_md.set_rtc_time)(nowtime);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)