summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-acl.c7
-rw-r--r--src/login/logind.c14
-rw-r--r--src/login/sysfs-show.c3
3 files changed, 15 insertions, 9 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";
diff --git a/src/login/logind.c b/src/login/logind.c
index b97ba6df3e..48da7b173b 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -198,6 +198,10 @@ static int manager_enumerate_devices(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;
@@ -211,9 +215,6 @@ static int manager_enumerate_devices(Manager *m) {
if (!d)
return -ENOMEM;
- if (!udev_device_get_is_initialized(d))
- continue;
-
k = manager_process_seat_device(m, d);
if (k < 0)
r = k;
@@ -249,6 +250,10 @@ static int manager_enumerate_buttons(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;
@@ -262,9 +267,6 @@ static int manager_enumerate_buttons(Manager *m) {
if (!d)
return -ENOMEM;
- if (!udev_device_get_is_initialized(d))
- continue;
-
k = manager_process_button_device(m, d);
if (k < 0)
r = k;
diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c
index f7d11ddc4c..05cb787a68 100644
--- a/src/login/sysfs-show.c
+++ b/src/login/sysfs-show.c
@@ -170,7 +170,10 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) {
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;