mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 14:55:37 +03:00
sd-device: make FOREACH_DEVICE_SYSATTR() also list write-only attributes
Closes #10102.
This commit is contained in:
parent
372e8592c6
commit
ab218d0bdb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user