diff options
author | ache <ache@FreeBSD.org> | 1996-04-05 03:36:31 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-04-05 03:36:31 +0000 |
commit | 434490d43803611d1db1f1e99cfb16d171106205 (patch) | |
tree | 3ffd7498a4f969813e2e8f9dfe93fb476ea49cea /sys/isa | |
parent | def84715cb7f087981c292f84ec358d43019c286 (diff) | |
download | FreeBSD-src-434490d43803611d1db1f1e99cfb16d171106205.zip FreeBSD-src-434490d43803611d1db1f1e99cfb16d171106205.tar.gz |
Add wall_cmos_clock sysctl variable, needed to manage adjkerntz even for
UTC cmos clocks (needed for Local Timezone FSes)
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/atrtc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index b4a01ce..97b0de7 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.53 1996/03/23 21:36:03 nate Exp $ + * $Id: clock.c,v 1.54 1996/03/31 04:05:36 bde Exp $ */ /* @@ -92,8 +92,10 @@ */ #define TIMER0_MIN_MAX_COUNT TIMER_DIV(20000) -int adjkerntz = 0; /* offset from CMOS clock */ -int disable_rtc_set = 0; /* disable resettodr() if != 0 */ +int adjkerntz; /* local offset from GMT in seconds */ +int disable_rtc_set; /* disable resettodr() if != 0 */ +int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ + u_int idelayed; #if defined(I586_CPU) || defined(I686_CPU) unsigned i586_ctr_rate; @@ -491,7 +493,7 @@ inittodr(time_t base) /* sec now contains the number of seconds, since Jan 1 1970, in the local time zone */ - sec += tz.tz_minuteswest * 60 + adjkerntz; + sec += tz.tz_minuteswest * 60 + wall_cmos_clock ? adjkerntz : 0; s = splclock(); time.tv_sec = sec; @@ -524,7 +526,7 @@ resettodr() /* Calculate local time to put in RTC */ - tm -= tz.tz_minuteswest * 60 + adjkerntz; + tm -= tz.tz_minuteswest * 60 + wall_cmos_clock ? adjkerntz : 0; writertc(RTC_SEC, bin2bcd(tm%60)); tm /= 60; /* Write back Seconds */ writertc(RTC_MIN, bin2bcd(tm%60)); tm /= 60; /* Write back Minutes */ |