Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2014 14:18:56 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271312 - head/sys/dev/vt
Message-ID:  <201409091418.s89EIujo087738@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Tue Sep  9 14:18:56 2014
New Revision: 271312
URL: http://svnweb.freebsd.org/changeset/base/271312

Log:
  Revert r269474. Special keyboard combinations should be handled by separate
  sysctls.

Modified:
  head/sys/dev/vt/vt.h
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt.h
==============================================================================
--- head/sys/dev/vt/vt.h	Tue Sep  9 14:09:51 2014	(r271311)
+++ head/sys/dev/vt/vt.h	Tue Sep  9 14:18:56 2014	(r271312)
@@ -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 *);

Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c	Tue Sep  9 14:09:51 2014	(r271311)
+++ head/sys/dev/vt/vt_core.c	Tue Sep  9 14:18:56 2014	(r271312)
@@ -122,9 +122,6 @@ VT_SYSCTL_INT(enable_altgr, 1, "Enable A
 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);
 	};
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409091418.s89EIujo087738>