Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amiga/dev *sigh*



details:   https://anonhg.NetBSD.org/src/rev/518a2e071f28
branches:  trunk
changeset: 480088:518a2e071f28
user:      is <is%NetBSD.org@localhost>
date:      Sun Jan 02 18:29:22 2000 +0000

description:
*sigh*
Y2000-patch for A2000, A3000 and A4000 battery backed clock modules,
mostly by Adam Ciarcinski.

diffstat:

 sys/arch/amiga/dev/a2kbbc.c  |  6 ++++--
 sys/arch/amiga/dev/a34kbbc.c |  6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (51 lines):

diff -r 6636180b4cd5 -r 518a2e071f28 sys/arch/amiga/dev/a2kbbc.c
--- a/sys/arch/amiga/dev/a2kbbc.c       Sun Jan 02 16:31:17 2000 +0000
+++ b/sys/arch/amiga/dev/a2kbbc.c       Sun Jan 02 18:29:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: a2kbbc.c,v 1.7 1999/03/28 21:39:59 is Exp $    */
+/*     $NetBSD: a2kbbc.c,v 1.8 2000/01/02 18:29:22 is Exp $    */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -169,11 +169,13 @@
        rt->control1 &= ~A2CONTROL1_HOLD;
 
        dt.dt_year += CLOCK_BASE_YEAR;
+       if (dt.dt_year < STARTOFTIME)
+               dt.dt_year += 100;
 
        if ((dt.dt_hour > 23) ||
            (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);
diff -r 6636180b4cd5 -r 518a2e071f28 sys/arch/amiga/dev/a34kbbc.c
--- a/sys/arch/amiga/dev/a34kbbc.c      Sun Jan 02 16:31:17 2000 +0000
+++ b/sys/arch/amiga/dev/a34kbbc.c      Sun Jan 02 18:29:22 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.4 2000/01/02 18:29:23 is Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -127,6 +127,8 @@
        dt.dt_year  = rt->year1   * 10 + rt->year2;
 
        dt.dt_year += CLOCK_BASE_YEAR;
+       if (dt.dt_year < STARTOFTIME)
+               dt.dt_year += 100;
 
        /* let it run again.. */
        rt->control1 = A3CONTROL1_FREE_CLOCK;
@@ -135,7 +137,7 @@
            (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);



Home | Main Index | Thread Index | Old Index