When enumerated devices are being processed by udevd, we will receive
corresponding uevents later. So, we should not process devices in that
case.
_cleanup_set_free_ Set *ready_units = NULL, *not_ready_units = NULL;
Device *d;
+ if (device_is_processed(dev) <= 0)
+ continue;
+
if (device_setup_units(m, dev, &ready_units, ¬_ready_units) < 0)
continue;
if (r < 0)
return r;
- FOREACH_DEVICE(e, d)
+ FOREACH_DEVICE(e, d) {
+ if (device_is_processed(d) <= 0)
+ continue;
(void) manager_add_device(m, d);
+ }
return 0;
}
r = 0;
- FOREACH_DEVICE(e, d)
+ FOREACH_DEVICE(e, d) {
+ if (device_is_processed(d) <= 0)
+ continue;
RET_GATHER(r, manager_process_seat_device(m, d));
+ }
return r;
}
r = 0;
- FOREACH_DEVICE(e, d)
+ FOREACH_DEVICE(e, d) {
+ if (device_is_processed(d) <= 0)
+ continue;
RET_GATHER(r, manager_process_button_device(m, d));
+ }
return r;
}
if (r < 0)
return log_error_errno(r, "Failed to exclude loop devices: %m");
- FOREACH_DEVICE(enumerator, device)
+ FOREACH_DEVICE(enumerator, device) {
+ if (device_is_processed(device) <= 0)
+ continue;
device_added(&context, device);
+ }
}
_cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;