summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-device/device-private.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-30 22:16:17 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-30 22:26:16 +0200
commite53fc357a9bb9d0a5362ccc4246d598cb0febd5e (patch)
tree3bb6c3be9ba053e4a280b6c2ae8cd03be8f1ac6d /src/libsystemd/sd-device/device-private.c
parent618234a5258768359cb1086b152c5f08aaf89754 (diff)
tree-wide: remove a number of invocations of strerror() and replace by %m
Let's clean up our tree a bit, and reduce invocations of the thread-unsafe strerror() by replacing it with printf()'s %m specifier.
Diffstat (limited to 'src/libsystemd/sd-device/device-private.c')
-rw-r--r--src/libsystemd/sd-device/device-private.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c
index 0ec9667744..b5215cb9b5 100644
--- a/src/libsystemd/sd-device/device-private.c
+++ b/src/libsystemd/sd-device/device-private.c
@@ -200,10 +200,8 @@ static int device_read_db(sd_device *device) {
if (r < 0) {
if (r == -ENOENT)
return 0;
- else {
- log_debug("sd-device: failed to read db '%s': %s", path, strerror(-r));
- return r;
- }
+ else
+ return log_debug_errno(r, "sd-device: failed to read db '%s': %m", path);
}
/* devices with a database entry are initialized */
@@ -247,7 +245,7 @@ static int device_read_db(sd_device *device) {
db[i] = '\0';
r = handle_db_line(device, key, value);
if (r < 0)
- log_debug("sd-device: failed to handle db entry '%c:%s': %s", key, value, strerror(-r));
+ log_debug_errno(r, "sd-device: failed to handle db entry '%c:%s': %m", key, value);
state = PRE_KEY;
}