svn commit: r258023 - user/ed/newcons/sys/dev/vt
Aleksandr Rybalko
ray at FreeBSD.org
Mon Nov 11 22:07:56 UTC 2013
Author: ray
Date: Mon Nov 11 22:07:56 2013
New Revision: 258023
URL: http://svnweb.freebsd.org/changeset/base/258023
Log:
Add kern.vt.suspendswitch tunable. This will allow to disable default behavior
(switch to VT0 on suspend, switch back on resume).
If 0 - disabled, other values - enabled.
Requested by: jhb
Sponsored by: The FreeBSD Foundation
Modified:
user/ed/newcons/sys/dev/vt/vt_core.c
Modified: user/ed/newcons/sys/dev/vt/vt_core.c
==============================================================================
--- user/ed/newcons/sys/dev/vt/vt_core.c Mon Nov 11 22:00:12 2013 (r258022)
+++ user/ed/newcons/sys/dev/vt/vt_core.c Mon Nov 11 22:07:56 2013 (r258023)
@@ -107,6 +107,7 @@ int sc_txtmouse_no_retrace_wait;
static SYSCTL_NODE(_kern, OID_AUTO, vt, CTLFLAG_RD, 0, "Newcons parameters");
VT_SYSCTL_INT(debug, 0, "Newcons 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");
static unsigned int vt_unit = 0;
static MALLOC_DEFINE(M_VT, "vt", "vt device");
@@ -1603,6 +1604,8 @@ void
vt_suspend()
{
+ if (vt_suspendswitch == 0)
+ return;
/* Save current window. */
main_vd->vd_savedwindow = main_vd->vd_curwindow;
/* Ask holding process to free window and switch to console window */
@@ -1613,6 +1616,8 @@ void
vt_resume()
{
+ if (vt_suspendswitch == 0)
+ return;
/* Switch back to saved window */
if (main_vd->vd_savedwindow != NULL)
vt_proc_window_switch(main_vd->vd_savedwindow);
More information about the svn-src-user
mailing list