summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2019-01-20 02:45:44 +0000
committertedu <tedu@openbsd.org>2019-01-20 02:45:44 +0000
commit104b5a4b508f11b91970edb1e837c728b5ed7523 (patch)
tree760566465c839e1e8415396589615582114f9161
parentDon't delay signal(SIGPIPE, SIG_IGN) until go_daemon() does it. First, (diff)
downloadwireguard-openbsd-104b5a4b508f11b91970edb1e837c728b5ed7523.tar.xz
wireguard-openbsd-104b5a4b508f11b91970edb1e837c728b5ed7523.zip
make this look more like other pwr_action code (small_kernel)
-rw-r--r--sys/dev/acpi/acpibtn.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c
index f908e4b20e9..da3b59ef084 100644
--- a/sys/dev/acpi/acpibtn.c
+++ b/sys/dev/acpi/acpibtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibtn.c,v 1.46 2019/01/19 20:45:06 tedu Exp $ */
+/* $OpenBSD: acpibtn.c,v 1.47 2019/01/20 02:45:44 tedu Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -271,11 +271,18 @@ sleep:
break;
case ACPIBTN_POWER:
if (notify_type == 0x80) {
- printf("power button\n");
- if (pwr_action == 2)
+ switch (pwr_action) {
+ case 0:
+ break;
+ case 1:
+ acpi_addtask(sc->sc_acpi, acpi_powerdown_task,
+ sc->sc_acpi, 0);
+ break;
+#ifndef SMALL_KERNEL
+ case 2:
goto sleep;
- acpi_addtask(sc->sc_acpi, acpi_powerdown_task,
- sc->sc_acpi, 0);
+#endif
+ }
}
break;
default: