diff options
author | phk <phk@FreeBSD.org> | 2003-02-05 09:33:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-02-05 09:33:57 +0000 |
commit | 4612101b4708efce580c655550f020a3656355aa (patch) | |
tree | 51cfdebdb4d32e5d5d9e13c2878856360dd597df /sys/pc98 | |
parent | 545eeb1024302b3b776776ab730956295627f734 (diff) | |
download | FreeBSD-src-4612101b4708efce580c655550f020a3656355aa.zip FreeBSD-src-4612101b4708efce580c655550f020a3656355aa.tar.gz |
MFi386: write the correct weekday back to the RTC.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/clock.c | 2 | ||||
-rw-r--r-- | sys/pc98/cbus/pcrtc.c | 2 | ||||
-rw-r--r-- | sys/pc98/pc98/clock.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c index 9a247a9..6fda1ae 100644 --- a/sys/pc98/cbus/clock.c +++ b/sys/pc98/cbus/clock.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)) 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)) diff --git a/sys/pc98/pc98/clock.c b/sys/pc98/pc98/clock.c index 9a247a9..6fda1ae 100644 --- a/sys/pc98/pc98/clock.c +++ b/sys/pc98/pc98/clock.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)) |