xorg-x11-server/0001-config-udev-add-wrapper-around-check-if-server-is-no.patch

52 lines
1.6 KiB
Diff
Raw Normal View History

From 2103079b3e25f65d9aec7c56519d974e7ee6faca Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 27 Aug 2012 15:15:19 +1000
Subject: [PATCH 1/3] config/udev: add wrapper around check if server is not
seat 0
this is a simple clean-up that is useful to stop further propogation
of this construct.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
config/udev.c | 4 ++--
include/hotplug.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/config/udev.c b/config/udev.c
index 03aca28..adac273 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -339,7 +339,7 @@ config_udev_pre_init(void)
#endif
#ifdef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG
- if (SeatId && strcmp(SeatId, "seat0"))
+ if (ServerIsNotSeat0)
udev_monitor_filter_add_match_tag(udev_monitor, SeatId);
#endif
if (udev_monitor_enable_receiving(udev_monitor)) {
@@ -368,7 +368,7 @@ config_udev_init(void)
#endif
#ifdef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG
- if (SeatId && strcmp(SeatId, "seat0"))
+ if (ServerIsNotSeat0)
udev_enumerate_add_match_tag(enumerate, SeatId);
#endif
diff --git a/include/hotplug.h b/include/hotplug.h
index 96b078d..ceec49c 100644
--- a/include/hotplug.h
+++ b/include/hotplug.h
@@ -69,4 +69,6 @@ void config_odev_probe(config_odev_probe_proc_ptr probe_callback);
void NewGPUDeviceRequest(struct OdevAttributes *attribs);
void DeleteGPUDeviceRequest(struct OdevAttributes *attribs);
#endif
+
+#define ServerIsNotSeat0 (SeatId && strcmp(SeatId, "seat0"))
#endif /* HOTPLUG_H */
--
1.7.10.2