device-util: introduce device_get_seat() helper function

This commit is contained in:
Yu Watanabe
2025-05-14 02:06:02 +09:00
parent ab1bd9daed
commit 2012d6d74e
8 changed files with 44 additions and 18 deletions
+3 -2
View File
@@ -170,8 +170,9 @@ int devnode_acl_all(const char *seat,
if (sd_device_has_current_tag(d, "uaccess") <= 0)
continue;
if (sd_device_get_property_value(d, "ID_SEAT", &sn) < 0 || isempty(sn))
sn = "seat0";
r = device_get_seat(d, &sn);
if (r < 0)
return r;
if (!streq(seat, sn))
continue;