From 3da505965757e4e925366c29b363105405fd202d Mon Sep 17 00:00:00 2001 From: Christian Weisgerber Date: Fri, 24 Jun 2011 19:47:50 +0000 Subject: 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@ --- sys/arch/loongson/loongson/machdep.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sys/arch/loongson') diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c index 30d0d63dd38..0151104d072 100644 --- a/sys/arch/loongson/loongson/machdep.c +++ b/sys/arch/loongson/loongson/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.30 2011/06/05 19:41:07 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.31 2011/06/24 19:47:48 naddy Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -105,7 +105,6 @@ vaddr_t uncached_base; int physmem; /* Max supported memory, changes to actual. */ int ncpu = 1; /* At least one CPU in the system. */ struct user *proc0paddr; -int kbd_reset; const struct platform *sys_platform; struct cpu_hwinfo bootcpu_hwinfo; @@ -754,10 +753,6 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) return ENOTDIR; /* Overloaded */ switch (name[0]) { - case CPU_KBDRESET: - if (securelevel > 0) - return (sysctl_rdint(oldp, oldlenp, newp, kbd_reset)); - return (sysctl_int(oldp, oldlenp, newp, newlen, &kbd_reset)); default: return EOPNOTSUPP; } -- cgit v1.2.3