projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4189708
)
sd-device: get_driver - remember if a device does not have a driver
author
Tom Gundersen
<teg@jklm.no>
Mon, 1 Jun 2015 21:53:37 +0000
(23:53 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Tue, 2 Jun 2015 16:12:47 +0000
(18:12 +0200)
Don't try to read it again.
src/libsystemd/sd-device/sd-device.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-device/sd-device.c
b/src/libsystemd/sd-device/sd-device.c
index
af8137b
..
ddb7b93
100644
(file)
--- a/
src/libsystemd/sd-device/sd-device.c
+++ b/
src/libsystemd/sd-device/sd-device.c
@@
-901,8
+901,11
@@
_public_ int sd_device_get_driver(sd_device *device, const char **ret) {
if (r >= 0) {
r = device_set_driver(device, driver);
if (r < 0)
- return r;
- }
+ return log_debug_errno(r, "sd-device: could not set driver for %s: %m", device->devpath);
+ } else if (r == -ENOENT)
+ device->driver_set = true;
+ else
+ return log_debug_errno(r, "sd-device: could not set driver for %s: %m", device->devpath);
}
*ret = device->driver;