From 2a2137401b3aef20618308d2b2694e21b0124f89 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 26 Apr 2015 01:04:33 +0200 Subject: sd-device: don't complain if the uevent file is missing Only 'real' devices are required to have an uevent file. --- src/libsystemd/sd-device/sd-device.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libsystemd') 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; -- cgit v1.2.3-54-g00ecf