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.8-1.9 (requested...



details:   https://anonhg.NetBSD.org/src/rev/a9735fdbbb6a
branches:  netbsd-1-4
changeset: 469988:a9735fdbbb6a
user:      he <he%NetBSD.org@localhost>
date:      Sat Jan 08 18:16:25 2000 +0000

description:
Pull up revisions 1.8-1.9 (requested by is):
  Y2K fix for A2000, A3000 and A4000 battery backed clock modules.

diffstat:

 sys/arch/amiga/dev/a2kbbc.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 978630b1a708 -r a9735fdbbb6a sys/arch/amiga/dev/a2kbbc.c
--- a/sys/arch/amiga/dev/a2kbbc.c       Sat Jan 08 18:10:46 2000 +0000
+++ b/sys/arch/amiga/dev/a2kbbc.c       Sat Jan 08 18:16:25 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.7.2.1 2000/01/08 18:16:25 he 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);
@@ -203,7 +205,6 @@
                return (0);
 
        clock_secs_to_ymdhms(secs, &dt);
-       dt.dt_year -= CLOCK_BASE_YEAR;
 
        /*
         * hold clock
@@ -235,7 +236,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->weekday = dt.dt_wday;
 



Home | Main Index | Thread Index | Old Index