sd-device: make FOREACH_DEVICE_SYSATTR() also list write-only attributes

Closes #10102.
This commit is contained in:
Yu Watanabe
2021-12-14 21:49:56 +09:00
parent 372e8592c6
commit ab218d0bdb
+1 -1
View File
@@ -1812,7 +1812,7 @@ static int device_sysattrs_read_all_internal(sd_device *device, const char *subd
if (lstat(path, &statbuf) != 0)
continue;
if (!(statbuf.st_mode & S_IRUSR))
if ((statbuf.st_mode & (S_IRUSR | S_IWUSR)) == 0)
continue;
r = set_put_strdup(&device->sysattrs, p ?: dent->d_name);