diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-14 06:24:24 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-14 21:49:56 +0900 |
commit | ab218d0bdb11e70878907e1139c90b8e48f51e2d (patch) | |
tree | 7e17381d039de2050b1f08baaa647b81b99518c6 | |
parent | 372e8592c6e3a891174344be0899a91769ef61af (diff) | |
download | systemd-ab218d0bdb11e70878907e1139c90b8e48f51e2d.tar.gz |
sd-device: make FOREACH_DEVICE_SYSATTR() also list write-only attributes
Closes #10102.
-rw-r--r-- | src/libsystemd/sd-device/sd-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c index e594d5fbe4..8b6e1ddd69 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -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); |