summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/linux/lnx_init.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-05-19 22:39:09 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-16 17:13:06 -0700
commit93abda6bddf770dbfc3d4d0ada61ea84a7b7b9be (patch)
tree2407e24282867bb09157f085d75aba8010611678 /hw/xfree86/os-support/linux/lnx_init.c
parent0caeef6146bee5fb1827ab25db191685dde9d4b4 (diff)
xfree86: move -novtswitch & -sharevts argument handling up to common layer
Stop duplicating in each os-support variant before it gets replicated even further. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_init.c')
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 77dfb2f16..9c9174034 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -39,8 +39,6 @@
#include <sys/stat.h>
static Bool KeepTty = FALSE;
-static Bool VTSwitch = TRUE;
-static Bool ShareVTs = FALSE;
static int activeVT = -1;
static char vtname[11];
@@ -109,7 +107,7 @@ xf86OpenConsole(void)
"xf86OpenConsole: Cannot open /dev/tty0 (%s)\n",
strerror(errno));
- if (ShareVTs)
+ if (xf86Info.ShareVTs)
{
SYSCALL(ret = ioctl(fd, VT_GETSTATE, &vts));
if (ret < 0)
@@ -184,7 +182,7 @@ xf86OpenConsole(void)
}
#endif
- if (!ShareVTs)
+ if (!xf86Info.ShareVTs)
{
struct termios nTty;
@@ -240,7 +238,7 @@ xf86OpenConsole(void)
* of Init?$#*&Device(). So I just place it here */
}
} else { /* serverGeneration != 1 */
- if (!ShareVTs && VTSwitch)
+ if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch)
{
/* now get the VT */
switch_to(xf86Info.vtno, "xf86OpenConsole");
@@ -254,7 +252,7 @@ xf86CloseConsole(void)
struct vt_mode VT;
int ret;
- if (ShareVTs) {
+ if (xf86Info.ShareVTs) {
close(xf86Info.consoleFd);
return;
}
@@ -286,7 +284,7 @@ xf86CloseConsole(void)
strerror(errno));
}
- if (VTSwitch)
+ if (xf86Info.autoVTSwitch)
{
/*
* Perform a switch back to the active VT when we were started
@@ -311,16 +309,7 @@ xf86ProcessArgument(int argc, char *argv[], int i)
KeepTty = TRUE;
return 1;
}
- if (!strcmp(argv[i], "-novtswitch"))
- {
- VTSwitch = FALSE;
- return 1;
- }
- if (!strcmp(argv[i], "-sharevts"))
- {
- ShareVTs = TRUE;
- return 1;
- }
+
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
{
if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0)
@@ -340,6 +329,4 @@ xf86UseMsg(void)
ErrorF("vtXX use the specified VT number\n");
ErrorF("-keeptty ");
ErrorF("don't detach controlling tty (for debugging only)\n");
- ErrorF("-novtswitch don't immediately switch to new VT\n");
- ErrorF("-sharevts share VTs with another X server\n");
}