summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/pcrtc.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-02-05 09:33:57 +0000
committerphk <phk@FreeBSD.org>2003-02-05 09:33:57 +0000
commit4612101b4708efce580c655550f020a3656355aa (patch)
tree51cfdebdb4d32e5d5d9e13c2878856360dd597df /sys/pc98/cbus/pcrtc.c
parent545eeb1024302b3b776776ab730956295627f734 (diff)
downloadFreeBSD-src-4612101b4708efce580c655550f020a3656355aa.zip
FreeBSD-src-4612101b4708efce580c655550f020a3656355aa.tar.gz
MFi386: write the correct weekday back to the RTC.
Diffstat (limited to 'sys/pc98/cbus/pcrtc.c')
-rw-r--r--sys/pc98/cbus/pcrtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c
index 9a247a9..6fda1ae 100644
--- a/sys/pc98/cbus/pcrtc.c
+++ b/sys/pc98/cbus/pcrtc.c
@@ -1248,7 +1248,7 @@ resettodr()
rtc_outb(bin2bcd(tm%24)); tm /= 24; /* Write back Hours */
/* We have now the days since 01-01-1970 in tm */
- wd = (tm+4)%7;
+ wd = (tm + 4) % 7 + 1); /* Write back Weekday */
for (y = 1970, m = DAYSPERYEAR + LEAPYEAR(y);
tm >= m;
y++, m = DAYSPERYEAR + LEAPYEAR(y))
OpenPOWER on IntegriCloud