Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 Try shutdown with ACPI only when ACPI is ...
details: https://anonhg.NetBSD.org/src/rev/6476fe73e297
branches: trunk
changeset: 550674:6476fe73e297
user: kochi <kochi%NetBSD.org@localhost>
date: Sun Aug 17 14:15:43 2003 +0000
description:
Try shutdown with ACPI only when ACPI is enabled.
Patch from Masanori Kanaoka (with a little modification by me).
diffstat:
sys/arch/i386/i386/machdep.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (33 lines):
diff -r 3affed24e6a3 -r 6476fe73e297 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Sun Aug 17 11:06:46 2003 +0000
+++ b/sys/arch/i386/i386/machdep.c Sun Aug 17 14:15:43 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.529 2003/08/11 14:09:18 drochner Exp $ */
+/* $NetBSD: machdep.c,v 1.530 2003/08/17 14:15:43 kochi Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.529 2003/08/11 14:09:18 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.530 2003/08/17 14:15:43 kochi Exp $");
#include "opt_cputype.h"
#include "opt_ddb.h"
@@ -891,9 +891,11 @@
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
#if NACPI > 0
- delay(500000);
- acpi_enter_sleep_state(acpi_softc, ACPI_STATE_S5);
- printf("WARNING: powerdown failed!\n");
+ if (acpi_softc != NULL) {
+ delay(500000);
+ acpi_enter_sleep_state(acpi_softc, ACPI_STATE_S5);
+ printf("WARNING: ACPI powerdown failed!\n");
+ }
#endif
#if NAPM > 0 && !defined(APM_NO_POWEROFF)
/* turn off, if we can. But try to turn disk off and
Home |
Main Index |
Thread Index |
Old Index