summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2006-05-31 10:34:55 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2006-05-31 10:34:55 +0000
commit478da6c538eef7781713b07cb3f4f96dc2d87125 (patch)
tree7c36022b9ef65a939430c43ac319c5606e50368c /sys/arch/amd64
parent92997dcc968b37d6a6af4345f642423dc0bb87fc (diff)
do not call acpi_powerdown() unless acpi has successfully initialized
ok gwk@ canacar@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/machdep.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index 211f3f07d18..e972acecad9 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.49 2006/05/27 04:46:12 gwk Exp $ */
+/* $OpenBSD: machdep.c,v 1.50 2006/05/31 10:34:54 todd Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -910,11 +910,13 @@ haltsys:
if (howto & RB_HALT) {
#if NACPI > 0
- extern int acpi_s5;
+ extern int acpi_s5, acpi_enabled;
- delay(500000);
- if (howto & RB_POWERDOWN || acpi_s5)
- acpi_powerdown();
+ if (acpi_enabled) {
+ delay(500000);
+ if (howto & RB_POWERDOWN || acpi_s5)
+ acpi_powerdown();
+ }
#endif
printf("\n");
printf("The operating system has halted.\n");