aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/config/udev.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
committermarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
commiteef864d36de97903007f04fad9fa43afe297745b (patch)
tree28dd3cae5f699b493e4d72e7e7d468a5a2cae7f4 /xorg-server/config/udev.c
parentf543ceaca6820260f15a4eff86938214cf43c7d2 (diff)
downloadvcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.gz
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.bz2
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.zip
fontconfig xserver xkeyboard-config pixman git update 2012
Diffstat (limited to 'xorg-server/config/udev.c')
-rw-r--r--xorg-server/config/udev.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/xorg-server/config/udev.c b/xorg-server/config/udev.c
index 8b3ca0475..1995184f3 100644
--- a/xorg-server/config/udev.c
+++ b/xorg-server/config/udev.c
@@ -281,15 +281,14 @@ block_handler(pointer data, struct timeval **tv, pointer read_mask)
}
int
-config_udev_init(void)
+config_udev_pre_init(void)
{
struct udev *udev;
- struct udev_enumerate *enumerate;
- struct udev_list_entry *devices, *device;
udev = udev_new();
if (!udev)
return 0;
+
udev_monitor = udev_monitor_new_from_netlink(udev, "udev");
if (!udev_monitor)
return 0;
@@ -302,12 +301,21 @@ config_udev_init(void)
if (SeatId && strcmp(SeatId, "seat0"))
udev_monitor_filter_add_match_tag(udev_monitor, SeatId);
#endif
-
if (udev_monitor_enable_receiving(udev_monitor)) {
ErrorF("config/udev: failed to bind the udev monitor\n");
return 0;
}
+ return 1;
+}
+int
+config_udev_init(void)
+{
+ struct udev *udev;
+ struct udev_enumerate *enumerate;
+ struct udev_list_entry *devices, *device;
+
+ udev = udev_monitor_get_udev(udev_monitor);
enumerate = udev_enumerate_new(udev);
if (!enumerate)
return 0;