assert(m);
-#if 0
- /* FIXME: this is always false for devices received from udev_monitor */
-
- /* Don't pick up devices before udev finished initialization for them */
- if (!udev_device_get_is_initialized(dev))
- return 0;
-#endif
-
sysfs = udev_device_get_syspath(dev);
if (!sysfs)
return 0;
if (r < 0)
goto fail;
+ r = udev_enumerate_add_match_is_initialized(e);
+ if (r < 0)
+ goto fail;
+
r = udev_enumerate_scan_devices(e);
if (r < 0)
goto fail;
if (r < 0)
return r;
+ r = udev_enumerate_add_match_is_initialized(e);
+ if (r < 0)
+ return r;
+
r = udev_enumerate_scan_devices(e);
if (r < 0)
return r;
if (!d)
return -ENOMEM;
- if (!udev_device_get_is_initialized(d))
- continue;
-
sn = udev_device_get_property_value(d, "ID_SEAT");
if (isempty(sn))
sn = "seat0";
if (r < 0)
return r;
+ r = udev_enumerate_add_match_is_initialized(e);
+ if (r < 0)
+ return r;
+
r = udev_enumerate_scan_devices(e);
if (r < 0)
return r;
if (!d)
return -ENOMEM;
- if (!udev_device_get_is_initialized(d))
- continue;
-
k = manager_process_seat_device(m, d);
if (k < 0)
r = k;
if (r < 0)
return r;
+ r = udev_enumerate_add_match_is_initialized(e);
+ if (r < 0)
+ return r;
+
r = udev_enumerate_scan_devices(e);
if (r < 0)
return r;
if (!d)
return -ENOMEM;
- if (!udev_device_get_is_initialized(d))
- continue;
-
k = manager_process_button_device(m, d);
if (k < 0)
r = k;
r = udev_enumerate_add_match_tag(e, seat);
else
r = udev_enumerate_add_match_tag(e, "seat");
+ if (r < 0)
+ return r;
+ r = udev_enumerate_add_match_is_initialized(e);
if (r < 0)
return r;
if (r < 0)
return r;
+ r = udev_enumerate_add_match_is_initialized(e);
+ if (r < 0)
+ return r;
+
r = udev_enumerate_scan_devices(e);
if (r < 0)
return r;
if (!d)
return -ENOMEM;
- if (!udev_device_get_is_initialized(d))
- continue;
-
k = manager_process_link(m, d);
if (k < 0)
r = k;