xserver: Branch 'master' - 4 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 10 13:50:45 UTC 2024
Xext/xres.c | 6 +++---
Xext/xselinux_hooks.c | 2 +-
dix/dispatch.c | 2 +-
dix/grabs.c | 2 +-
dix/main.c | 2 +-
dix/window.c | 1 +
hw/xwayland/xwayland-xtest.c | 1 +
include/client.h | 26 +-------------------------
include/dixstruct.h | 4 +++-
os/access.c | 1 +
os/client.c | 6 ++++--
os/client_priv.h | 35 +++++++++++++++++++++++++++++++++++
12 files changed, 53 insertions(+), 35 deletions(-)
New commits:
commit bd8d3455fbcc42c7e66d20662eecc5b208061224
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Mar 5 15:00:39 2024 +0100
os: don't include client.h anymore
There's no need to include client.h anymore. But still leaving it, in case
some external consumer relying on it's presence.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
diff --git a/os/client_priv.h b/os/client_priv.h
index 03dbd4099..c84cc35ea 100644
--- a/os/client_priv.h
+++ b/os/client_priv.h
@@ -8,8 +8,6 @@
#include <sys/types.h>
-#include "client.h"
-
/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
* instead of accessing the fields directly. */
struct _ClientId {
commit 1891a8dc147cfaf63b6db0249f1520f2c091fb85
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Mar 5 14:51:53 2024 +0100
os: unexport client id retrieval functions
These aren't used by any (known) external modules, thus no need to export them.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
diff --git a/dix/grabs.c b/dix/grabs.c
index fb768b06c..fc27f8612 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -55,6 +55,7 @@ SOFTWARE.
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "os/auth.h"
+#include "os/client_priv.h"
#include "misc.h"
#include "windowstr.h"
@@ -64,7 +65,6 @@ SOFTWARE.
#include "xace.h"
#include "exglobals.h"
#include "inpututils.h"
-#include "client.h"
#define BITMASK(i) (((Mask)1) << ((i) & 31))
#define MASKIDX(i) ((i) >> 5)
diff --git a/dix/window.c b/dix/window.c
index 500582b9c..573d195ab 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -105,6 +105,7 @@ Equipment Corporation.
#include "dix/input_priv.h"
#include "dix/property_priv.h"
#include "os/auth.h"
+#include "os/client_priv.h"
#include "os/screensaver.h"
#include "misc.h"
diff --git a/hw/xwayland/xwayland-xtest.c b/hw/xwayland/xwayland-xtest.c
index 5541fecef..0bb65399b 100644
--- a/hw/xwayland/xwayland-xtest.c
+++ b/hw/xwayland/xwayland-xtest.c
@@ -32,6 +32,7 @@
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
+#include "os/client_priv.h"
#include <inputstr.h>
#include <inpututils.h>
diff --git a/include/client.h b/include/client.h
index 1f3d9065f..d71dc8d05 100644
--- a/include/client.h
+++ b/include/client.h
@@ -30,15 +30,7 @@
#include <dix-config.h>
#endif /* HAVE_DIX_CONFIG_H */
-#include <sys/types.h>
-#include <X11/Xfuncproto.h>
-
struct _Client;
typedef struct _ClientId *ClientIdPtr;
-/* Query cached client IDs. Exported on purpose for drivers. */
-extern _X_EXPORT pid_t GetClientPid(struct _Client *client);
-extern _X_EXPORT const char *GetClientCmdName(struct _Client *client);
-extern _X_EXPORT const char *GetClientCmdArgs(struct _Client *client);
-
#endif /* CLIENT_H */
diff --git a/os/access.c b/os/access.c
index d3fce1ec6..cebd39a4f 100644
--- a/os/access.c
+++ b/os/access.c
@@ -174,6 +174,7 @@ SOFTWARE.
#include <X11/Xos_r.h>
#include "os/auth.h"
+#include "os/client_priv.h"
#include "dixstruct.h"
#include "osdep.h"
diff --git a/os/client_priv.h b/os/client_priv.h
index 27dc4f36b..03dbd4099 100644
--- a/os/client_priv.h
+++ b/os/client_priv.h
@@ -29,4 +29,9 @@ void ReleaseClientIds(struct _Client *client);
pid_t DetermineClientPid(struct _Client *client);
void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
+/* Query cached client IDs. Exported on purpose for drivers. */
+pid_t GetClientPid(struct _Client *client);
+const char *GetClientCmdName(struct _Client *client);
+const char *GetClientCmdArgs(struct _Client *client);
+
#endif /* _XSERVER_DIX_CLIENT_PRIV_H */
commit ed3c2aeeb164443d5cb08d0bdceeda7a3cc792b2
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Mar 5 14:22:57 2024 +0100
os: unexport DetermineClientPid() and DetermineClientCmd()
These aren't used by any drivers/modules, so no need to export them.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
diff --git a/include/client.h b/include/client.h
index 8ecd41704..1f3d9065f 100644
--- a/include/client.h
+++ b/include/client.h
@@ -36,12 +36,6 @@
struct _Client;
typedef struct _ClientId *ClientIdPtr;
-/* Determine client IDs for caching. Exported on purpose for
- * extensions such as SELinux. */
-extern _X_EXPORT pid_t DetermineClientPid(struct _Client *client);
-extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname,
- const char **cmdargs);
-
/* Query cached client IDs. Exported on purpose for drivers. */
extern _X_EXPORT pid_t GetClientPid(struct _Client *client);
extern _X_EXPORT const char *GetClientCmdName(struct _Client *client);
diff --git a/os/client_priv.h b/os/client_priv.h
index 176e72045..27dc4f36b 100644
--- a/os/client_priv.h
+++ b/os/client_priv.h
@@ -24,4 +24,9 @@ struct _Client;
void ReserveClientIds(struct _Client *client);
void ReleaseClientIds(struct _Client *client);
+/* Determine client IDs for caching. Exported on purpose for
+ * extensions such as SELinux. */
+pid_t DetermineClientPid(struct _Client *client);
+void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
+
#endif /* _XSERVER_DIX_CLIENT_PRIV_H */
commit 7ac7a2d6deb18bf789a3ed76af81cdb270a5cb33
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Thu Feb 8 16:03:56 2024 +0100
os: split off internal definitions from client.h
The client.h file is part of the public module API, but it also contains
definitions that aren't useful for being used in modules. Splitting them
out into their own client_priv.h file, which isn't part of the API.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
diff --git a/Xext/xres.c b/Xext/xres.c
index 818a45c02..dd776ba62 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -4,26 +4,26 @@
#include <dix-config.h>
+#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <assert.h>
+#include <X11/extensions/XResproto.h>
#include "dix/registry_priv.h"
+#include "os/client_priv.h"
#include "misc.h"
#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "swaprep.h"
-#include <X11/extensions/XResproto.h>
#include "pixmapstr.h"
#include "windowstr.h"
#include "gcstruct.h"
#include "extinit_priv.h"
#include "protocol-versions.h"
-#include "client.h"
#include "list.h"
#include "misc.h"
#include <string.h>
diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
index 13d0dfe2a..4007958a9 100644
--- a/Xext/xselinux_hooks.c
+++ b/Xext/xselinux_hooks.c
@@ -33,6 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <X11/Xfuncproto.h>
#include "dix/registry_priv.h"
+#include "os/client_priv.h"
#include "selection.h"
#include "inputstr.h"
@@ -41,7 +42,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "propertyst.h"
#include "extnsionst.h"
#include "xacestr.h"
-#include "client.h"
#define _XSELINUX_NEED_FLASK_MAP
#include "xselinuxint.h"
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 4200971f8..c25e372d9 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -112,6 +112,7 @@ Equipment Corporation.
#include "dix/screenint_priv.h"
#include "include/resource.h"
#include "os/auth.h"
+#include "os/client_priv.h"
#include "os/ddx_priv.h"
#include "os/osdep.h"
#include "os/screensaver.h"
@@ -133,7 +134,6 @@ Equipment Corporation.
#include "xace.h"
#include "inputstr.h"
#include "xkbsrv.h"
-#include "client.h"
#include "xfixesint.h"
#include "dixstruct_priv.h"
diff --git a/dix/main.c b/dix/main.c
index 8117ea8e5..793ac778b 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -92,6 +92,7 @@ Equipment Corporation.
#include "dix/registry_priv.h"
#include "os/audit.h"
#include "os/auth.h"
+#include "os/client_priv.h"
#include "os/cmdline.h"
#include "os/ddx_priv.h"
#include "os/osdep.h"
@@ -114,7 +115,6 @@ Equipment Corporation.
#include "dixfont.h"
#include "extnsionst.h"
#include "privates.h"
-#include "client.h"
#include "exevents.h"
#ifdef PANORAMIX
#include "panoramiXsrv.h"
diff --git a/include/client.h b/include/client.h
index 87f2b1172..8ecd41704 100644
--- a/include/client.h
+++ b/include/client.h
@@ -29,22 +29,12 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif /* HAVE_DIX_CONFIG_H */
-#include <X11/Xfuncproto.h>
-#include <sys/types.h>
-/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
- * instead of accessing the fields directly. */
-typedef struct {
- pid_t pid; /* process ID, -1 if not available */
- const char *cmdname; /* process name, NULL if not available */
- const char *cmdargs; /* process arguments, NULL if not available */
-} ClientIdRec, *ClientIdPtr;
+#include <sys/types.h>
+#include <X11/Xfuncproto.h>
struct _Client;
-
-/* Initialize and clean up. */
-void ReserveClientIds(struct _Client *client);
-void ReleaseClientIds(struct _Client *client);
+typedef struct _ClientId *ClientIdPtr;
/* Determine client IDs for caching. Exported on purpose for
* extensions such as SELinux. */
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 3607ea88a..66f6081b0 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -73,6 +73,8 @@ typedef struct _saveSet {
#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
#define SaveSetAssignMap(ss,m) ((ss).map = (m))
+struct _ClientId;
+
typedef struct _Client {
void *requestBuffer;
void *osPrivate; /* for OS layer, including scheduler */
@@ -109,7 +111,7 @@ typedef struct _Client {
int smart_stop_tick;
DeviceIntPtr clientPtr;
- ClientIdPtr clientIds;
+ struct _ClientId *clientIds;
int req_fds;
} ClientRec;
diff --git a/os/client.c b/os/client.c
index 5c5278c32..bcbaee677 100644
--- a/os/client.c
+++ b/os/client.c
@@ -50,12 +50,14 @@
*
* Author: Rami Ylimäki <rami.ylimaki at vincit.fi>
*/
+#include <dix-config.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include "client.h"
+#include "os/client_priv.h"
+
#include "os.h"
#include "dixstruct.h"
@@ -452,7 +454,7 @@ ReserveClientIds(struct _Client *client)
return;
assert(!client->clientIds);
- client->clientIds = calloc(1, sizeof(ClientIdRec));
+ client->clientIds = calloc(1, sizeof(struct _ClientId));
if (!client->clientIds)
return;
diff --git a/os/client_priv.h b/os/client_priv.h
new file mode 100644
index 000000000..176e72045
--- /dev/null
+++ b/os/client_priv.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ * Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
+ */
+#ifndef _XSERVER_DIX_CLIENT_PRIV_H
+#define _XSERVER_DIX_CLIENT_PRIV_H
+
+#include <sys/types.h>
+
+#include "client.h"
+
+/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
+ * instead of accessing the fields directly. */
+struct _ClientId {
+ pid_t pid; /* process ID, -1 if not available */
+ const char *cmdname; /* process name, NULL if not available */
+ const char *cmdargs; /* process arguments, NULL if not available */
+};
+
+struct _Client;
+
+/* Initialize and clean up. */
+void ReserveClientIds(struct _Client *client);
+void ReleaseClientIds(struct _Client *client);
+
+#endif /* _XSERVER_DIX_CLIENT_PRIV_H */
More information about the xorg-commit
mailing list