diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-01-17 05:53:41 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-01-17 05:53:41 +0000 |
commit | 0ea1c6aba679ac47f9349d0bb53c79010d4a31a5 (patch) | |
tree | af2289979789389e1ef352002df1572ae33708a8 /sys/arch | |
parent | 537673ae3155e363e447048b0d50995653b4ffb7 (diff) |
don't update battery backed up clock if system time is wrong from begin
in ddb.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 9 |
3 files changed, 23 insertions, 8 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index df76a3845fc..4a31d9652e7 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.13 1996/12/08 00:20:18 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.14 1997/01/17 05:53:37 kstailey Exp $ */ /* $NetBSD: machdep.c,v 1.52 1996/11/06 20:19:19 cgd Exp $ */ /* @@ -852,9 +852,14 @@ boot(howto /* , bootstr */) vfs_shutdown(); /* * If we've been adjusting the clock, the todr - * will be out of synch; adjust it now. + * will be out of synch; adjust it now unless + * the system was sitting in ddb. */ - resettodr(); + if ((howto & RB_TIMEBAD) == 0) { + resettodr(); + } else { + printf("WARNING: not updating battery clock\n"); + } } /* Disable interrupts. */ diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c index f998c2b3386..95619f69328 100644 --- a/sys/arch/amiga/amiga/machdep.c +++ b/sys/arch/amiga/amiga/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.16 1997/01/16 09:23:24 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.17 1997/01/17 05:53:39 kstailey Exp $ */ /* $NetBSD: machdep.c,v 1.82 1996/12/17 07:32:54 is Exp $ */ /* @@ -1037,9 +1037,14 @@ bootsync(void) /* * If we've been adjusting the clock, the todr - * will be out of synch; adjust it now. + * will be out of synch; adjust it now unless + * the system was sitting in ddb. */ - resettodr(); + if ((howto & RB_TIMEBAD) == 0) { + resettodr(); + } else { + printf("WARNING: not updating battery clock\n"); + } } } diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 1cb608323a6..6b84e987d6b 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -653,9 +653,14 @@ boot(howto) /* * If we've been adjusting the clock, the todr - * will be out of synch; adjust it now. + * will be out of synch; adjust it now unless + * the system was sitting in ddb. */ - resettodr(); + if ((howto & RB_TIMEBAD) == 0) { + resettodr(); + } else { + printf("WARNING: not updating battery clock\n"); + } } (void) splhigh(); /* ??? */ if (howto & RB_HALT) { |