Date: Mon, 11 Nov 2013 22:07:56 +0000 (UTC) From: Aleksandr Rybalko <ray@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r258023 - user/ed/newcons/sys/dev/vt Message-ID: <201311112207.rABM7uKt038291@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311112207.rABM7uKt038291>