diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-01-21 17:49:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-01-21 17:49:24 +0000 |
commit | 95944c72f68b1e822899332709ee1f6d7bf5e639 (patch) | |
tree | 94ead85275fd9b04d171d807233fbdfae23e1bb8 /sys/arch/loongson/dev | |
parent | ec9dc6e358d2c3190644924dd8bb58f469c7492c (diff) |
Pick the correct year when reading clock.
Diffstat (limited to 'sys/arch/loongson/dev')
-rw-r--r-- | sys/arch/loongson/dev/mcclock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/loongson/dev/mcclock.c b/sys/arch/loongson/dev/mcclock.c index b0b9b3e4bd8..cbaaf5279da 100644 --- a/sys/arch/loongson/dev/mcclock.c +++ b/sys/arch/loongson/dev/mcclock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcclock.c,v 1.1 2009/12/25 21:04:30 miod Exp $ */ +/* $OpenBSD: mcclock.c,v 1.2 2010/01/21 17:49:23 miod Exp $ */ /* $NetBSD: mcclock.c,v 1.4 1996/10/13 02:59:41 christos Exp $ */ /* @@ -95,7 +95,7 @@ mcclock_get(dev, base, ct) ct->dow = regs[MC_DOW]; ct->day = regs[MC_DOM]; ct->mon = regs[MC_MONTH]; - ct->year = regs[MC_YEAR]; + ct->year = regs[MC_YEAR] + 2000; } /* @@ -120,7 +120,7 @@ mcclock_set(dev, ct) regs[MC_DOW] = ct->dow; regs[MC_DOM] = ct->day; regs[MC_MONTH] = ct->mon; - regs[MC_YEAR] = ct->year; + regs[MC_YEAR] = ct->year - 2000; s = splclock(); MC146818_PUTTOD(sc, ®s); |