summaryrefslogtreecommitdiffstats
path: root/sys/dev/dec/mcclock.c
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2001-11-03 17:22:50 +0000
committergallatin <gallatin@FreeBSD.org>2001-11-03 17:22:50 +0000
commitf8c48b0904480174f3f3a271ee41dbfd60d8a0f0 (patch)
treed422a2f20c58389b7be663a54d6fda9e466a4b49 /sys/dev/dec/mcclock.c
parentea642e6058721b958befdc46845b768143fd1d6d (diff)
downloadFreeBSD-src-f8c48b0904480174f3f3a271ee41dbfd60d8a0f0.zip
FreeBSD-src-f8c48b0904480174f3f3a271ee41dbfd60d8a0f0.tar.gz
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
Diffstat (limited to 'sys/dev/dec/mcclock.c')
-rw-r--r--sys/dev/dec/mcclock.c14
1 files changed, 2 insertions, 12 deletions
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, &regs);
splx(s);
OpenPOWER on IntegriCloud