From d07f8725bf1d589c479f3d998834e287acdcbde1 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 17 Jan 2006 20:29:00 +0000 Subject: Do not invoke resettodr() on shutdown if we have been sitting in ddb. --- sys/arch/alpha/alpha/machdep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 397c90cbad9..9e24c5377be 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.95 2005/11/23 01:59:02 martin Exp $ */ +/* $OpenBSD: machdep.c,v 1.96 2006/01/17 20:28:59 miod Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -1112,9 +1112,14 @@ boot(howto) 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 has been sitting in ddb. */ - resettodr(); + if ((howto & RB_TIMEBAD) == 0) { + resettodr(); + } else { + printf("WARNING: not updating battery clock\n"); + } } /* Disable interrupts. */ -- cgit v1.2.3