diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-10-02 14:27:49 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-10-02 14:27:49 +0000 |
commit | 3619de0518a35586449e0bd268e0a39c0808d58d (patch) | |
tree | f81d2ea3b28f553959a68d6048e9b2e237c4528a /sys/arch | |
parent | 03ed4f2a2a64d85ad9365d68875c133aed2dd2a8 (diff) |
RB_POWERDOWN. Come on people, RB_POWERDOWN has existing for *months*,
doesn't anyone bother to check these things?
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 5b0c8ef62a4..45f43c3ec6b 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.53 1997/09/28 16:49:41 flipk Exp $ */ +/* $OpenBSD: machdep.c,v 1.54 1997/10/02 14:27:48 downsj Exp $ */ /* $NetBSD: machdep.c,v 1.202 1996/05/18 15:54:59 christos Exp $ */ /*- @@ -796,14 +796,18 @@ haltsys: if (howto & RB_HALT) { #if NAPM > 0 && !defined(APM_NO_POWEROFF) - /* turn off, if we can. But try to turn disk off and - * wait a bit first--some disk drives are slow to clean up - * and users have reported disk corruption. - */ - delay(500000); - apm_set_powstate(APM_DEV_DISK(0xff), APM_SYS_OFF); - delay(500000); - apm_set_powstate(APM_DEV_ALLDEVS, APM_SYS_OFF); + if (howto & RB_POWERDOWN) { + printf("\nAttempting to power down...\n"); + /* + * Turn off, if we can. But try to turn disk off and + * wait a bit first--some disk drives are slow to + * clean up and users have reported disk corruption. + */ + delay(500000); + apm_set_powstate(APM_DEV_DISK(0xff), APM_SYS_OFF); + delay(500000); + apm_set_powstate(APM_DEV_ALLDEVS, APM_SYS_OFF); + } #endif printf("\n"); printf("The operating system has halted.\n"); |