core,logind,networkd: check for udev device initialization via enumeration matches

Instead of checking each device after we got it, check wuth an
enumeration filter instead, to make it more efficient.
This commit is contained in:
Lennart Poettering
2013-12-18 18:21:28 +01:00
parent fa28bc2df7
commit e120204729
5 changed files with 23 additions and 20 deletions
+4 -3
View File
@@ -171,6 +171,10 @@ int manager_udev_enumerate_links(Manager *m) {
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;
@@ -184,9 +188,6 @@ int manager_udev_enumerate_links(Manager *m) {
if (!d)
return -ENOMEM;
if (!udev_device_get_is_initialized(d))
continue;
k = manager_process_link(m, d);
if (k < 0)
r = k;