summaryrefslogtreecommitdiff
path: root/src/login/logind-acl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-18 17:12:15 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-18 18:21:28 +0100
commite120204729764f6243b60899eb907103e678bee2 (patch)
tree6513453989189dec5bdc57a2e0a28a2bfee2012a /src/login/logind-acl.c
parentfa28bc2df724e4aff46d19cb7aa732cc64c71061 (diff)
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.
Diffstat (limited to 'src/login/logind-acl.c')
-rw-r--r--src/login/logind-acl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c
index 09a6f6d90b..dc86f0f1a2 100644
--- a/src/login/logind-acl.c
+++ b/src/login/logind-acl.c
@@ -210,6 +210,10 @@ int devnode_acl_all(struct udev *udev,
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;
@@ -223,9 +227,6 @@ int devnode_acl_all(struct udev *udev,
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";