summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-14 15:15:49 +0200
committerTom Gundersen <teg@jklm.no>2015-04-14 16:19:37 +0200
commitbba061662b0f759abb43bad60c9733305c191045 (patch)
treeeef8913b535630164661a9c47c0f365634a59224 /src
parent8d8ce9e2cd066e90c17e2d1eb1882defabb1fa63 (diff)
sd-device: allow uevent files to be write-only
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-device/sd-device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
index b828fa830a..7d52e3cc1d 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
@@ -499,7 +499,10 @@ int device_read_uevent_file(sd_device *device) {
path = strjoina(syspath, "/uevent");
r = read_full_file(path, &uevent, &uevent_len);
- if (r < 0) {
+ if (r == -EACCES)
+ /* empty uevent files may be write-only */
+ return 0;
+ else if (r < 0) {
log_debug("sd-device: failed to read uevent file '%s': %s", path, strerror(-r));
return r;
}