summaryrefslogtreecommitdiffstats
path: root/sys/dev/vt
diff options
context:
space:
mode:
authorray <ray@FreeBSD.org>2014-09-09 14:18:56 +0000
committerray <ray@FreeBSD.org>2014-09-09 14:18:56 +0000
commit4f2d1acf2c8c5834d05ffb6853a6fe5cb00ce84d (patch)
treeb158dc048b2a53fa76c10c58d15be4bc0ec4f438 /sys/dev/vt
parentabf46035ae02b6750dbf028666f3c3711f3bc000 (diff)
downloadFreeBSD-src-4f2d1acf2c8c5834d05ffb6853a6fe5cb00ce84d.zip
FreeBSD-src-4f2d1acf2c8c5834d05ffb6853a6fe5cb00ce84d.tar.gz
Revert r269474. Special keyboard combinations should be handled by separate
sysctls.
Diffstat (limited to 'sys/dev/vt')
-rw-r--r--sys/dev/vt/vt.h6
-rw-r--r--sys/dev/vt/vt_core.c17
2 files changed, 5 insertions, 18 deletions
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
index b9303ba..e05c748 100644
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -87,12 +87,6 @@ static int vt_##_name = _default; \
SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, &vt_##_name, _default,\
_descr);
-/* Allow to disable some special keys by users. */
-#define VT_DEBUG_KEY_ENABLED (1 << 0)
-#define VT_REBOOT_KEY_ENABLED (1 << 1)
-#define VT_HALT_KEY_ENABLED (1 << 2)
-#define VT_POWEROFF_KEY_ENABLED (1 << 3)
-
struct vt_driver;
void vt_allocate(struct vt_driver *, void *);
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index ece102c..6fc5b98 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -122,9 +122,6 @@ VT_SYSCTL_INT(enable_altgr, 1, "Enable AltGr key (Do not assume R.Alt as Alt)");
VT_SYSCTL_INT(debug, 0, "vt(9) debug level");
VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode");
VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend");
-VT_SYSCTL_INT(spclkeys, (VT_DEBUG_KEY_ENABLED|VT_REBOOT_KEY_ENABLED|
- VT_HALT_KEY_ENABLED|VT_POWEROFF_KEY_ENABLED), "Enabled special keys "
- "handled by vt(4)");
static struct vt_device vt_consdev;
static unsigned int vt_unit = 0;
@@ -488,21 +485,17 @@ vt_machine_kbdevent(int c)
switch (c) {
case SPCLKEY | DBG:
- if (vt_spclkeys & VT_DEBUG_KEY_ENABLED)
- kdb_enter(KDB_WHY_BREAK, "manual escape to debugger");
+ kdb_enter(KDB_WHY_BREAK, "manual escape to debugger");
return (1);
case SPCLKEY | RBT:
- if (vt_spclkeys & VT_REBOOT_KEY_ENABLED)
- /* XXX: Make this configurable! */
- shutdown_nice(0);
+ /* XXX: Make this configurable! */
+ shutdown_nice(0);
return (1);
case SPCLKEY | HALT:
- if (vt_spclkeys & VT_HALT_KEY_ENABLED)
- shutdown_nice(RB_HALT);
+ shutdown_nice(RB_HALT);
return (1);
case SPCLKEY | PDWN:
- if (vt_spclkeys & VT_POWEROFF_KEY_ENABLED)
- shutdown_nice(RB_HALT|RB_POWEROFF);
+ shutdown_nice(RB_HALT|RB_POWEROFF);
return (1);
};
OpenPOWER on IntegriCloud