Not needed by any driver - only use as parameter to xf86ProcessActionEvent(),
which already is private.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The device node opening with seatd, like with systemd-logind can done during probe
(see get_drm_info in hw/xfree86/os-support/shared/drm_platform.c),
but in case of failure, the modesetting driver tries to open device
node directly (open_hw function in modesetting/driver.c).
This enchanes open_hw function to try use seatd arbiter for opening device node
in as last resort manner.
To make it functional seatd_libseat_open_graphics needs to have _X_EXPORT
Signed-off-by: tautvis <gtautvis gmail com>
Add necessary code into Xserver to support libseat (this time enabling
functionality).
Code used from Devuan repository + local changes to make functional in Xlibre
Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
Add xf86VTKeepTtyIsSet function to export KeepTty state.
When seatd activates, it takes control of current vt (in global sense)!,
this code only activates sesion control code when XServer started
using same vt (for more context see c88a325899 commit ).
Signed-off-By: Tautvis <gtautvis@gmail.com>
Refactor libseat code for Xlibre and add to meson.build:
* update meson for seat-libseat
* refactor code:
* seatd-libseat.c - add aditional private include headers
* add cast to libseat_set_log_handler argument 1 for (libseat_log_func),
for warning silencing
* make seatd_libseat_init to accept keeptty state as parameter
* include xf86Events, xf86_priv - make visible xf86VTLeave for seatd code (it
is neccesary because seatd can force console leave)
Signed-off-By: Tautvis <gtautvis@gmail.com>
This is initial patch for libseat. Technicaly almost verbatim code (with style changes)
from Devuan xorg server moved to os-support/shared directory as it can support other
oses than linux.
The original repository: https://git.devuan.org/devuan/xorg-server.git
The patch between fc24510f17e89a5bbac1065abab758a4d0c42634 and
6bf62381d0
Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
create it very early, so we're free to move around call sites
between subdirectories. preparation for untwisting the whole
probing logic.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ../os/xprintf.c: In function ‘XNFvasprintf’:
> ../os/xprintf.c:84:5: warning: function ‘XNFvasprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
> 84 | int size = vasprintf(ret, format, va);
> | ^~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ../hw/xwin/InitOutput.c: In function ‘XwinExtensionInit’:
> ../hw/xwin/InitOutput.c:142:5: warning: ‘LoadExtensionList’ reading 12 bytes from a region of size 0 [-Wstringop-overread]
> 142 | LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../hw/xwin/InitOutput.c:142:5: note: referencing argument 1 of type ‘const ExtensionModule[0]’
> In file included from ../include/extnsionst.h:53,
> from ../randr/randrstr.h:40,
> from ../hw/xwin/win.h:174,
> from ../hw/xwin/InitOutput.c:35:
> ../include/extension.h:100:23: note: in a call to function ‘LoadExtensionList’
> 100 | extern _X_EXPORT void LoadExtensionList(const ExtensionModule ext[],
> | ^~~~~~~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> In function ‘ConvertAddr’,
> inlined from ‘ResetHosts’ at ../os/access.c:1014:26:
> ../os/access.c:1540:25: warning: ‘saddr’ may be used uninitialized [-Wmaybe-uninitialized]
> 1540 | if (16777343 == *(long *) &((struct sockaddr_in *) saddr)->sin_addr)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../os/access.c: In function ‘ResetHosts’:
> ../os/access.c:908:7: note: ‘saddr’ declared here
> 908 | } saddr;
> | ^~~~~
The union isn't needed at all, we're just using one of the fields anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
the target struct type defines char* fields, but we're sure they'll
never be written into, so just add typecast for silencing the warning.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
a) trade a little bit of code size for speed
(depending on exact caller, compiler might also optimize a lot)
b) reduce the need for exported, but non-public symbol
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Since xtrans is now in-tree and already have been trimmed down
for only things needed by the Xserver, the split between xstrans.c
and transport.c isn't needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>