diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2011-06-24 19:47:50 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2011-06-24 19:47:50 +0000 |
commit | 3da505965757e4e925366c29b363105405fd202d (patch) | |
tree | 3bd93b0681c5ada7d7dac32ec4fcd54b6063055f /sys/arch/landisk/dev | |
parent | 7f1ea65fed8697f18acb9a18feab7940904e5e80 (diff) |
machdep.kbdreset enables a shutdown by Ctrl-Alt-Del on amd64 and
i386. Stop abusing it on other archs for controling a shutdown by
pressing the soft power button:
* Add a MI sysctl hw.allowpowerdown; if set to 1 (the default) it
allows a power button shutdown.
* Make acpi(4)/acpibtn(4) honor hw.allowpowerdown.
* Switch the various power button intercepts on landisk, sgi, sparc64
and zaurus over to hw.allowpowerdown.
* Garbage collect the machdep.kbdreset sysctl on all archs other than
amd64 and i386.
ok miod@
Diffstat (limited to 'sys/arch/landisk/dev')
-rw-r--r-- | sys/arch/landisk/dev/power.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/landisk/dev/power.c b/sys/arch/landisk/dev/power.c index 889acf50e04..cfe383ed948 100644 --- a/sys/arch/landisk/dev/power.c +++ b/sys/arch/landisk/dev/power.c @@ -1,4 +1,4 @@ -/* $OpenBSD: power.c,v 1.4 2007/06/15 18:17:25 miod Exp $ */ +/* $OpenBSD: power.c,v 1.5 2011/06/24 19:47:48 naddy Exp $ */ /* * Copyright (c) 2007 Martin Reindl. @@ -90,7 +90,7 @@ power_attach(struct device *parent, struct device *self, void *aux) int power_intr(void *arg) { - extern int kbd_reset; + extern int allowpowerdown; int status; status = (int8_t)_reg_read_1(LANDISK_BTNSTAT); @@ -105,8 +105,8 @@ power_intr(void *arg) Debugger(); #endif _reg_write_1(LANDISK_PWRSW_INTCLR, 1); - if (kbd_reset == 1) { - kbd_reset = 0; + if (allowpowerdown == 1) { + allowpowerdown = 0; psignal(initproc, SIGUSR1); } return (1); |