summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2006-05-31 10:01:57 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2006-05-31 10:01:57 +0000
commitda0f9c719dffc18cadfe581a85325fd86fe34e15 (patch)
tree7accf8d35286e342c2d1436cec67afb2de9d8645
parentdde8c58e3bf721803f36c54ccba99dfe81472e08 (diff)
Match the specs and only shut down if notify_type is 0x80
Reported and tested by todd@, ok gwk@
-rw-r--r--sys/dev/acpi/acpibtn.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c
index a6a282d1684..46ef1f9670f 100644
--- a/sys/dev/acpi/acpibtn.c
+++ b/sys/dev/acpi/acpibtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibtn.c,v 1.9 2006/02/25 21:44:45 marco Exp $ */
+/* $OpenBSD: acpibtn.c,v 1.10 2006/05/31 10:01:56 canacar Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -131,9 +131,11 @@ acpibtn_notify(struct aml_node *node, int notify_type, void *arg)
case ACPIBTN_SLEEP:
break;
case ACPIBTN_POWER:
- acpi_s5 = 1;
- psignal(initproc, SIGUSR1);
- /* NOTREACHED */
+ if (notify_type == 0x80) {
+ acpi_s5 = 1;
+ psignal(initproc, SIGUSR1);
+ /* NOTREACHED */
+ }
break;
default:
printf("%s: spurious acpi button interrupt %i\n", DEVNAME(sc),