Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/amiga/dev Pull up revisions 1.4-1.5 (requested...
details: https://anonhg.NetBSD.org/src/rev/d37f53acb61b
branches: netbsd-1-4
changeset: 469989:d37f53acb61b
user: he <he%NetBSD.org@localhost>
date: Sat Jan 08 18:16:54 2000 +0000
description:
Pull up revisions 1.4-1.5 (requested by is):
Y2K fix for A2000, A3000 and A4000 battery backed clock modules.
diffstat:
sys/arch/amiga/dev/a34kbbc.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (48 lines):
diff -r a9735fdbbb6a -r d37f53acb61b sys/arch/amiga/dev/a34kbbc.c
--- a/sys/arch/amiga/dev/a34kbbc.c Sat Jan 08 18:16:25 2000 +0000
+++ b/sys/arch/amiga/dev/a34kbbc.c Sat Jan 08 18:16:54 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: a34kbbc.c,v 1.3 1999/03/14 22:42:12 is Exp $ */
+/* $NetBSD: a34kbbc.c,v 1.3.2.1 2000/01/08 18:16:54 he Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -127,15 +127,19 @@
dt.dt_year = rt->year1 * 10 + rt->year2;
dt.dt_year += CLOCK_BASE_YEAR;
-
/* let it run again.. */
rt->control1 = A3CONTROL1_FREE_CLOCK;
+ printf("year read: %d.\n", dt.dt_year);
+ if (dt.dt_year < STARTOFTIME)
+ dt.dt_year += 100;
+
+
if ((dt.dt_hour > 23) ||
(dt.dt_wday > 6) ||
(dt.dt_day > 31) ||
(dt.dt_mon > 12) ||
- (dt.dt_year < STARTOFTIME) || (dt.dt_year > 2036))
+ /* (dt.dt_year < STARTOFTIME) || */ (dt.dt_year > 2036))
return (0);
secs = clock_ymdhms_to_secs(&dt);
@@ -163,7 +167,6 @@
return (0);
clock_secs_to_ymdhms(secs, &dt);
- dt.dt_year -= CLOCK_BASE_YEAR;
rt->control1 = A3CONTROL1_HOLD_CLOCK;
rt->second1 = dt.dt_sec / 10;
@@ -177,7 +180,7 @@
rt->day2 = dt.dt_day % 10;
rt->month1 = dt.dt_mon / 10;
rt->month2 = dt.dt_mon % 10;
- rt->year1 = dt.dt_year / 10;
+ rt->year1 = (dt.dt_year / 10) % 10;
rt->year2 = dt.dt_year % 10;
rt->control1 = A3CONTROL1_FREE_CLOCK;
Home |
Main Index |
Thread Index |
Old Index