summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/idev.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:09:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:17:51 +0100
commitc33b329709ebe2755181980a050d02ec7c81ed87 (patch)
tree39080c428c72c90daddbe1c08d45c181adf1476c /src/libsystemd-terminal/idev.c
parent5567fafbc9d83a1391f23ecdbe698a3c03929370 (diff)
treewide: more log_*_errno() conversions, multiline calls
Basically: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \ $f; done Plus manual indentation fixups.
Diffstat (limited to 'src/libsystemd-terminal/idev.c')
-rw-r--r--src/libsystemd-terminal/idev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd-terminal/idev.c b/src/libsystemd-terminal/idev.c
index e979b608b6..989683f39a 100644
--- a/src/libsystemd-terminal/idev.c
+++ b/src/libsystemd-terminal/idev.c
@@ -351,8 +351,8 @@ static int session_add_device(idev_session *s, idev_device *d) {
error:
if (r < 0)
- log_debug("idev: %s: error while adding device '%s': %s",
- s->name, d->name, strerror(-r));
+ log_debug_errno(r, "idev: %s: error while adding device '%s': %m",
+ s->name, d->name);
return r;
}
@@ -372,8 +372,8 @@ static int session_remove_device(idev_session *s, idev_device *d) {
idev_device_disable(d);
if (error < 0)
- log_debug("idev: %s: error while removing device '%s': %s",
- s->name, d->name, strerror(-error));
+ log_debug_errno(error, "idev: %s: error while removing device '%s': %m",
+ s->name, d->name);
idev_device_free(d);
return error;
}
@@ -420,8 +420,8 @@ static int session_remove_element(idev_session *s, idev_element *e) {
element_disable(e);
if (error < 0)
- log_debug("idev: %s: error while removing element '%s': %s",
- s->name, e->name, strerror(-r));
+ log_debug_errno(r, "idev: %s: error while removing element '%s': %m",
+ s->name, e->name);
idev_element_free(e);
return error;
}