Enrico Weigelt, metux IT consult
95301df1a9
dri3: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult
9c6271258c
dri3: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult
dc39130899
Xext: panoramiX: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
a5f44e4c59
Xext: panoramiX: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
587e00e167
Xext: xvmc: enable swapped requests
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
18331c6d19
Xext: xvmc: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
9ab956a7ef
Xext: xvmc: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
67292b02e3
xfixes: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
9b8638da17
xfixes: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
c2270f38b3
Xi: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
83a63a64a0
Xi: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
adefed6226
composite: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
7baf8767a0
composite: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
8ca929a021
damage: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
52bf89e19f
damage: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
c729bfd1f9
Xext: xv: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
2892b49d26
Xext: xv: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
757f6ab8bc
Xext: xtest: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
d929424514
Xext: xtest: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
a9f50509bc
Xext: selinux: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
105ee0f8ac
Xext: selinux: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
a45230afac
Xext: xres: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:44 +02:00
Enrico Weigelt, metux IT consult
153361bdc9
Xext: xres: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:43 +02:00
Enrico Weigelt, metux IT consult
fcb1bac94c
Xext: xf86bigfont: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
9cc70cd9ff
Xext: xf86bigfont: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
c133b094ef
Xext: xcmisc: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
6f360d77bb
Xext: xcmisc: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
0bf0da7b90
Xext: vidmode: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
99e8b56421
Xext: vidmode: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
75328e8356
Xext: sync: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
5cded6356d
Xext: sync: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
034791c693
Xext: security: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
35e8a37b17
Xext: security: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
03b8cb506f
Xext: geext: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
ff1cb0df89
Xext: geext: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
07ce669504
Xext: shm: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
bac5e1fa2d
Xext: shm: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
a7f9bcaf39
Xext: bigreq: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
f906f3afc4
Xext: bigreq: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
87c9317714
Xext: shape: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
7c92bf3937
Xext: shape: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
6f6379ff54
Xext: saver: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
0fde105e38
Xext: saver: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
428855b0df
Xext: dpms: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
9614b41afb
Xext: dpms: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
893f56f6b0
include: dix.h: add macros for request handlers and swapping
...
add some macros for making request handlers easier:
* REQUEST_HEAD_STRUCT() declares a struct and checks size (assuming
length field already had been swapped)
* REQUEST_FIELD_CARD16() swaps a CARD16 (word) if neccessary
* REQUEST_FIELD_CARD32() swaps a CARD32 (dword) if neccessary
How to use them:
1. move swapping of lengths field into the SProc*Dispatch() and drop it
from the individual SProc*()'s
2. put REQUEST_HEAD_STRUCT() ontop of each Proc*()
3. add REQUEST_FIELD_*() below, for all fields to be swapped and
drop their swapping from the SProc*()'s
4. clean up unnecessary wrappers (SProc*()'s just be just call the
corresponding Proc*() by now)
5. let demux SProc just swap length field and call the normal Proc*Dispatch()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
1d9c412683
Xext: panoramiX: ProcXineramaQueryScreens(): reply payload in one block
...
Simplify writing reply payload into just one block.
This also makes further simplifications by subsequent patches easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
b619f19c84
Xext: selinux: allocate reply buffer on stack
...
Simplify reply buffer in SELinuxSendItemsToClient() by putting it on stack.
No need to go through heap and free it later, if the compiler can do all
the work for us.
This also allows further generalizations of reply sending code by upcoming
commits.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
8501dda10d
(submit/cleanup-xi) test: Xi: make sure client swapped flag is reset
...
Some test cases are recycling the ClientRec between swapped/unwapped runs.
Make sure the Client's swapped flag is always reset in those cases.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00
Enrico Weigelt, metux IT consult
63f510ebf2
(submit/cleanup-xi) Xi: use stack allocation for temporary buffers
...
Small buffers easily fit on stack, which is much faster (just moving SP),
and alloca()'ed buffers are cleaned up automatically on function leave,
no extra free() needed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:05 +02:00