xserver/hw/xfree86/os-support
Hans de Goede 1dba5a0b19 linux: Add linux_parse_vt_settings and linux_get_keeptty helpers
systemd-logind integration does not work when starting X on a new tty, as
that detaches X from the current session and after hat systemd-logind revokes
all rights on any already open fds and refuses to open new fds for X.

This means that currently e.g. "startx -- vt7" breaks, and breaks badly,
requiring ssh access to the system to kill X.

The fix for this is easy, we must not use systemd-logind integration when
not using KeepTty, or iow we may only use systemd-logind integration together
with KeepTty.

But the final KeepTty value is not known until the code to chose which vtno to
run on has been called, which currently happens after intializing
systemd-logind.

This commit is step 1 in fixing the "startx -- vt7" breakage, it factors out
the linux xf86OpenConsole bits which set xf86Info.vtno and keepTty so that
these can be called earlier. Calling this earlier is safe as this code has
no side effects other than setting xf86Info.vtno and keepTty.

Note this basically only moves a large chunk of xf86OpenConsole() into
linux_parse_vt_settings() without changing a single line of it, this is
hard to see in the diff because the identation level has changed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-03 11:31:30 +02:00
..
bsd Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
bus Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
hurd Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
linux linux: Add linux_parse_vt_settings and linux_get_keeptty helpers 2015-06-03 11:31:30 +02:00
misc Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
shared Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
solaris Remove apSolaris.shar (old "aperture" kernel driver for Solaris) 2015-04-21 16:57:07 -07:00
stub xfree86: Remove xf86ReadBIOS 2014-09-16 11:58:53 -04:00
Makefile.am xfree86: Add stubs for os-support to help adding new architecture support 2011-10-15 21:18:47 -07:00
int10Defines.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
xf86OSpriv.h xfree86: Remove xf86LinearVidMem 2014-09-16 11:58:53 -04:00
xf86_OSlib.h Solaris: Move shared declarations to xf86_OSlib.h 2014-12-19 18:16:19 -08:00
xf86_OSproc.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00