diff options
| author | David Malone <dwmalone@FreeBSD.org> | 2007-07-23 09:42:32 +0000 |
|---|---|---|
| committer | David Malone <dwmalone@FreeBSD.org> | 2007-07-23 09:42:32 +0000 |
| commit | 6d8617d42a1988bcc6543ac0c42fa2d998075b50 (patch) | |
| tree | 9e35e0b6e5b6c0c6047ac01c3aa7bf287ef1c85d /sys/isa/atrtc.c | |
| parent | 8136d21ec099b9b42574c27f0f94de9d003b1c66 (diff) | |
Notes
Diffstat (limited to 'sys/isa/atrtc.c')
| -rw-r--r-- | sys/isa/atrtc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index f8e1c4e39d07..a519a9e7d641 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -679,8 +679,7 @@ inittodr(time_t base) /* Look if we have a RTC present and the time is valid */ if (!(rtcin(RTC_STATUSD) & RTCSD_PWR)) { - printf("Invalid time in real time clock.\n"); - printf("Check and reset the date immediately!\n"); + printf("Invalid time in clock: check and reset the date!\n"); return; } @@ -704,7 +703,11 @@ inittodr(time_t base) #else ct.year += 2000; #endif - clock_ct_to_ts(&ct, &ts); + /* Should we set dow = -1 because some clocks don't set it correctly? */ + if (clock_ct_to_ts(&ct, &ts)) { + printf("Invalid time in clock: check and reset the date!\n"); + return; + } ts.tv_sec += utc_offset(); tc_setclock(&ts); } |
