diff options
author | Daniel Mack <github@zonque.org> | 2015-10-01 09:46:09 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-10-01 09:46:09 +0200 |
commit | 47c67a5042968163dae8d4e4d160232800843e55 (patch) | |
tree | 8b30347368544961ff6e08d4330fa014b5e43cfc /src/libsystemd/sd-device/device-private.c | |
parent | 8abf5291564e771bfc62c74a55ab3f3b56f45257 (diff) | |
parent | 5c22925a5713ad6f62d89ef478b82e571e9ba688 (diff) |
Merge pull request #1426 from poettering/log-syntax
logging fixes and more
Diffstat (limited to 'src/libsystemd/sd-device/device-private.c')
-rw-r--r-- | src/libsystemd/sd-device/device-private.c | 8 |
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; } |