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/sparc64/dev/rtc.c | |
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/sparc64/dev/rtc.c')
-rw-r--r-- | sys/arch/sparc64/dev/rtc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/rtc.c b/sys/arch/sparc64/dev/rtc.c index dfa57e4ed53..ae69bc342ac 100644 --- a/sys/arch/sparc64/dev/rtc.c +++ b/sys/arch/sparc64/dev/rtc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtc.c,v 1.8 2010/04/10 12:52:39 kettenis Exp $ */ +/* $OpenBSD: rtc.c,v 1.9 2011/06/24 19:47:49 naddy Exp $ */ /* * Copyright (c) 1992, 1993 @@ -208,10 +208,10 @@ rtc_attach(struct device *parent, struct device *self, void *aux) int rtc_intr(void *arg) { - extern int kbd_reset; + extern int allowpowerdown; - if (kbd_reset == 1) { - kbd_reset = 0; + if (allowpowerdown == 1) { + allowpowerdown = 0; psignal(initproc, SIGUSR2); } return (1); |