summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-26 01:04:33 +0200
committerTom Gundersen <teg@jklm.no>2015-04-26 01:30:23 +0200
commit2a2137401b3aef20618308d2b2694e21b0124f89 (patch)
tree1ed13cce0ba59a3542b774e9370cd0acff3f7000 /src/libsystemd
parent5d236c1f420b7a717b8f40415c0e0ae7d52f3aba (diff)
sd-device: don't complain if the uevent file is missing
Only 'real' devices are required to have an uevent file.
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-device/sd-device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
index fd4622987c..9ef851a6bb 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
@@ -510,6 +510,9 @@ int device_read_uevent_file(sd_device *device) {
if (r == -EACCES)
/* empty uevent files may be write-only */
return 0;
+ else if (r == -ENOENT)
+ /* some devices may not have uevent files, see set_syspath() */
+ return 0;
else if (r < 0) {
log_debug("sd-device: failed to read uevent file '%s': %s", path, strerror(-r));
return r;