summaryrefslogtreecommitdiff
path: root/src/core/busname.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:17:02 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:29:21 +0100
commit31938a8560a664c32a9d72f1fc2d4347b232e6e9 (patch)
tree9f967dd20a3c372b9ccd5c3ea03c15c2708a22b9 /src/core/busname.c
parentb2dc4e44c540a30c5ea12a9a570425ceb310c320 (diff)
core: convert log_unit_*() to log_unit_*_errno()
Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_unit_(debug|info|notice|warning|error|emergency)\(([^"]+), "(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_unit_\1_errno(\2, \5, "\3%m"\4);/'
Diffstat (limited to 'src/core/busname.c')
-rw-r--r--src/core/busname.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/busname.c b/src/core/busname.c
index 8e9d1cfb7..6a0aef8d1 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -284,7 +284,7 @@ static int busname_watch_fd(BusName *n) {
else
r = sd_event_add_io(UNIT(n)->manager->event, &n->starter_event_source, n->starter_fd, EPOLLIN, busname_dispatch_io, n);
if (r < 0) {
- log_unit_warning(UNIT(n)->id, "Failed to watch starter fd: %s", strerror(-r));
+ log_unit_warning_errno(UNIT(n)->id, r, "Failed to watch starter fd: %m");
busname_unwatch_fd(n);
return r;
}
@@ -453,14 +453,14 @@ static void busname_enter_signal(BusName *n, BusNameState state, BusNameResult f
n->control_pid,
false);
if (r < 0) {
- log_unit_warning(UNIT(n)->id, "%s failed to kill control process: %s", UNIT(n)->id, strerror(-r));
+ log_unit_warning_errno(UNIT(n)->id, r, "%s failed to kill control process: %m", UNIT(n)->id);
goto fail;
}
if (r > 0) {
r = busname_arm_timer(n);
if (r < 0) {
- log_unit_warning(UNIT(n)->id, "%s failed to arm timer: %s", UNIT(n)->id, strerror(-r));
+ log_unit_warning_errno(UNIT(n)->id, r, "%s failed to arm timer: %m", UNIT(n)->id);
goto fail;
}
@@ -484,7 +484,7 @@ static void busname_enter_listening(BusName *n) {
if (n->activating) {
r = busname_watch_fd(n);
if (r < 0) {
- log_unit_warning(UNIT(n)->id, "%s failed to watch names: %s", UNIT(n)->id, strerror(-r));
+ log_unit_warning_errno(UNIT(n)->id, r, "%s failed to watch names: %m", UNIT(n)->id);
goto fail;
}
@@ -515,7 +515,7 @@ static void busname_enter_making(BusName *n) {
r = busname_make_starter(n, &n->control_pid);
if (r < 0) {
- log_unit_warning(UNIT(n)->id, "%s failed to fork 'making' task: %s", UNIT(n)->id, strerror(-r));
+ log_unit_warning_errno(UNIT(n)->id, r, "%s failed to fork 'making' task: %m", UNIT(n)->id);
goto fail;
}
@@ -526,7 +526,7 @@ static void busname_enter_making(BusName *n) {
r = bus_kernel_make_starter(n->starter_fd, n->name, n->activating, n->accept_fd, NULL, n->policy_world);
if (r < 0) {
- log_unit_warning(UNIT(n)->id, "%s failed to make starter: %s", UNIT(n)->id, strerror(-r));
+ log_unit_warning_errno(UNIT(n)->id, r, "%s failed to make starter: %m", UNIT(n)->id);
goto fail;
}