summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/idev-evdev.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-evdev.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-evdev.c')
-rw-r--r--src/libsystemd-terminal/idev-evdev.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libsystemd-terminal/idev-evdev.c b/src/libsystemd-terminal/idev-evdev.c
index 63fa89e47d..b3e86bfb19 100644
--- a/src/libsystemd-terminal/idev-evdev.c
+++ b/src/libsystemd-terminal/idev-evdev.c
@@ -222,8 +222,8 @@ static int idev_evdev_io(idev_evdev *evdev) {
}
if (error < 0)
- log_debug("idev-evdev: %s/%s: error on data event: %s",
- e->session->name, e->name, strerror(-error));
+ log_debug_errno(error, "idev-evdev: %s/%s: error on data event: %m",
+ e->session->name, e->name);
return error;
error:
@@ -448,8 +448,8 @@ static void unmanaged_evdev_resume(idev_element *e) {
r = idev_evdev_resume(&eu->evdev, fd);
if (r < 0)
- log_debug("idev-evdev: %s/%s: cannot resume: %s",
- e->session->name, e->name, strerror(-r));
+ log_debug_errno(r, "idev-evdev: %s/%s: cannot resume: %m",
+ e->session->name, e->name);
}
static void unmanaged_evdev_pause(idev_element *e) {
@@ -571,8 +571,8 @@ static int managed_evdev_take_device_fn(sd_bus *bus,
r = idev_evdev_resume(&em->evdev, fd);
if (r < 0)
- log_debug("idev-evdev: %s/%s: cannot resume: %s",
- s->name, e->name, strerror(-r));
+ log_debug_errno(r, "idev-evdev: %s/%s: cannot resume: %m",
+ s->name, e->name);
return 0;
}
@@ -621,8 +621,8 @@ static void managed_evdev_enable(idev_element *e) {
return;
error:
- log_debug("idev-evdev: %s/%s: cannot send TakeDevice request: %s",
- s->name, e->name, strerror(-r));
+ log_debug_errno(r, "idev-evdev: %s/%s: cannot send TakeDevice request: %m",
+ s->name, e->name);
}
static void managed_evdev_disable(idev_element *e) {
@@ -679,8 +679,8 @@ static void managed_evdev_disable(idev_element *e) {
}
if (r < 0 && r != -ENOTCONN)
- log_debug("idev-evdev: %s/%s: cannot send ReleaseDevice: %s",
- s->name, e->name, strerror(-r));
+ log_debug_errno(r, "idev-evdev: %s/%s: cannot send ReleaseDevice: %m",
+ s->name, e->name);
}
static void managed_evdev_resume(idev_element *e, int fd) {
@@ -705,8 +705,8 @@ static void managed_evdev_resume(idev_element *e, int fd) {
r = idev_evdev_resume(&em->evdev, fd);
if (r < 0)
- log_debug("idev-evdev: %s/%s: cannot resume: %s",
- s->name, e->name, strerror(-r));
+ log_debug_errno(r, "idev-evdev: %s/%s: cannot resume: %m",
+ s->name, e->name);
return;
}
@@ -776,8 +776,8 @@ static void managed_evdev_pause(idev_element *e, const char *mode) {
}
if (r < 0)
- log_debug("idev-evdev: %s/%s: cannot send PauseDeviceComplete: %s",
- s->name, e->name, strerror(-r));
+ log_debug_errno(r, "idev-evdev: %s/%s: cannot send PauseDeviceComplete: %m",
+ s->name, e->name);
}
}