summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-monitor.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:29:59 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:49:27 +0100
commit56f64d95763a799ba4475daf44d8e9f72a1bd474 (patch)
tree4c38253c718dc1972b811fa7c01ebfa3c2b7776c /src/udev/udevadm-monitor.c
parent895b3a7b44fe7ca2f260986be2a877ff56a72718 (diff)
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
Diffstat (limited to 'src/udev/udevadm-monitor.c')
-rw-r--r--src/udev/udevadm-monitor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c
index e776fb99dc..1a5f516ddc 100644
--- a/src/udev/udevadm-monitor.c
+++ b/src/udev/udevadm-monitor.c
@@ -155,7 +155,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) {
fd_ep = epoll_create1(EPOLL_CLOEXEC);
if (fd_ep < 0) {
- log_error("error creating epoll fd: %m");
+ log_error_errno(errno, "error creating epoll fd: %m");
return 1;
}
@@ -195,7 +195,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) {
ep_udev.events = EPOLLIN;
ep_udev.data.fd = fd_udev;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_udev, &ep_udev) < 0) {
- log_error("fail to add fd to epoll: %m");
+ log_error_errno(errno, "fail to add fd to epoll: %m");
return 2;
}
@@ -229,7 +229,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) {
ep_kernel.events = EPOLLIN;
ep_kernel.data.fd = fd_kernel;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_kernel, &ep_kernel) < 0) {
- log_error("fail to add fd to epoll: %m");
+ log_error_errno(errno, "fail to add fd to epoll: %m");
return 5;
}