Commit Graph

20290 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult c14c7ec016 WIP: clean up forgotten comment 2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult 48918f28d9 Xext: panoramiX: PanoramiXGetImage() 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:45 +02:00
Enrico Weigelt, metux IT consult 165eb1be2b dri: 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 d03d79f96b dri: 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 32f6a22dd1 dri: ProcXF86DRIGetDrawableInfo() allocate temporary buffer on stack
No need for going through heap, stack is also fine.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult c704eb884a dri: use static struct init on declaration & drop useless assignments
Make the code a bit easier to read by using initialization of the reply
structs, at the point of declaration. Most of them aren't written to later,
just passed into WriteReplyToClient(). Also dropping some useless zero
assignments (struct initializers automatically zero-out unmentioned fields).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult bbfdb50b5c dbe: 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 2a63c0911f dbe: 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 0c3d3856cc dbe: ProcDbeGetVisualInfo() collect payload in buffer before writing
The payload lengths is already known, so we can easily collect the data
in a stack buffer and only need one WriteToClient() operation.

This also clears the road for further simplification/unification of the
reply sending code, coming with follow-up commits.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult 3f37b07864 dbe: simplify temporary buffer allocation via local stack
Small buffers easily fit on stack, so their allocation can be simplified.
No need to go through heap and have extra free() calls on each return point.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult f1c658e581 xkb: use new macros for byte swapping in network buffers
Use the new macros for doing byte-swapping in network buffer structs
which aren't requests or reply structs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:25:45 +02:00
Enrico Weigelt, metux IT consult 1425d94daa xkb: 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 71cbcb6f02 xkb: 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 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