xserver-multidpi/hw/xfree86
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
..
common dix: hook up the unaccelerated valuator masks 2015-05-20 12:44:58 +10:00
ddc Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
dixmods Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
doc xfree86: Remove the memory of MTRR awareness 2014-09-16 11:58:53 -04:00
dri Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
dri2 Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
drivers modesetting: Include dix-config.h from dumb_bo.c 2015-05-12 08:02:11 -07:00
exa xfree86/exa: xf86GetOptValString returns const char * now 2014-01-12 10:14:50 -08:00
fbdevhw Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
glamor_egl glamor: Share code for put_image handling. 2014-06-15 23:20:09 +01:00
i2c Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
int10 int10: Fix error check for pci_device_map_legacy 2015-03-13 12:31:21 +10:00
loader Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
man xserver: add xorg.conf support for gpu devices. (v2.1) 2015-04-27 13:40:40 +10:00
modes Merge remote-tracking branch 'ajax/xserver-next' 2015-05-11 16:34:48 -07:00
os-support linux: Add linux_parse_vt_settings and linux_get_keeptty helpers 2015-06-03 11:31:30 +02:00
parser xserver: add xorg.conf support for gpu devices. (v2.1) 2015-04-27 13:40:40 +10:00
ramdac Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
shadowfb Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
utils Add XNFcallocarray() to allow xnfcalloc() to check for overflow 2015-04-21 16:57:07 -07:00
vbe Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
vgahw Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
x86emu Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Makefile.am xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
sdksyms.sh symbols: Fix sdksyms.sh to cope with gcc5 2015-03-13 12:31:21 +10:00
xorg-wrapper.c xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
xorgconf.cpp xfree86: fix wrong DontZap documentation (#71113) 2014-05-24 20:02:56 +10:00