From f8c48b0904480174f3f3a271ee41dbfd60d8a0f0 Mon Sep 17 00:00:00 2001 From: gallatin Date: Sat, 3 Nov 2001 17:22:50 +0000 Subject: Introduce a boot environment variable (clock_compat_osf1) which can be set to 1 to make FreeBSD and Tru64 coexist peacefully on a dual boot system and not clobber each other's year in the TOY clock. (Tru64 uses an offset 52 years higher than one would expect) Obtained from: NetBSD MFC After: 1 week --- sys/dev/dec/mcclock.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'sys/dev/dec/mcclock.c') diff --git a/sys/dev/dec/mcclock.c b/sys/dev/dec/mcclock.c index 9cb3af2..a8a94be 100644 --- a/sys/dev/dec/mcclock.c +++ b/sys/dev/dec/mcclock.c @@ -84,13 +84,6 @@ mcclock_get(device_t dev, time_t base, struct clocktime *ct) ct->day = regs[MC_DOM]; ct->mon = regs[MC_MONTH]; ct->year = regs[MC_YEAR]; - /* - * This chip is not y2k compliant- If it's less than - * 70, we're clearly past the year 2000. - */ - if (ct->year < 70) { - ct->year += 100; - } } /* @@ -112,11 +105,8 @@ mcclock_set(device_t dev, struct clocktime *ct) regs[MC_DOW] = ct->dow; regs[MC_DOM] = ct->day; regs[MC_MONTH] = ct->mon; - /* - * This chip is not y2k compliant- write it with - * no more than two digits. - */ - regs[MC_YEAR] = ct->year % 100; + regs[MC_YEAR] = ct->year; + s = splclock(); MC146818_PUTTOD(dev, ®s); splx(s); -- cgit v1.1