summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-05-05 14:55:15 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2015-01-14 15:13:42 +1000
commite23268e3628898fe07e8d947be5d3306273d1552 (patch)
tree61bfc1dfb1bdfeed0c0eb2e0184e62e8e506d285
parent855ad6d556e050d6f9022f89707d94284fa45d71 (diff)
xfree86: unset vt number when closing console
The vt number is set when xf86OpenConsole is called, and should be unset when xf86CloseConsole is called, so that a new VT can be selected later (if reactivating). Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index e375c9af4..6b8776317 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -293,6 +293,8 @@ xf86CloseConsole(void)
SYSCALL(ioctl(xf86Info.consoleFd, TIOCNOTTY, 0));
OsSignal(SIGHUP, handler);
+ xf86Info.vtno = -1;
+
if (xf86Info.ShareVTs || systemd_logind_controls_session()) {
close(xf86Info.consoleFd);
xf86Info.consoleFd = -1;