summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r--src/resolve/resolved-bus.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
index 0029023bcc..517d20eca9 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/resolve/resolved-bus.c
@@ -251,7 +251,7 @@ static void bus_method_resolve_hostname_complete(DnsQuery *q) {
finish:
if (r < 0) {
- log_error("Failed to send hostname reply: %s", strerror(-r));
+ log_error_errno(-r, "Failed to send hostname reply: %m");
sd_bus_reply_method_errno(q->request, -r, NULL);
}
@@ -419,7 +419,7 @@ static void bus_method_resolve_address_complete(DnsQuery *q) {
finish:
if (r < 0) {
- log_error("Failed to send address reply: %s", strerror(-r));
+ log_error_errno(-r, "Failed to send address reply: %m");
sd_bus_reply_method_errno(q->request, -r, NULL);
}
@@ -591,7 +591,7 @@ static void bus_method_resolve_record_complete(DnsQuery *q) {
finish:
if (r < 0) {
- log_error("Failed to send record reply: %s", strerror(-r));
+ log_error_errno(-r, "Failed to send record reply: %m");
sd_bus_reply_method_errno(q->request, -r, NULL);
}
@@ -690,7 +690,7 @@ static int match_prepare_for_sleep(sd_bus *bus, sd_bus_message *message, void *u
r = sd_bus_message_read(message, "b", &b);
if (r < 0) {
- log_debug("Failed to parse PrepareForSleep signal: %s", strerror(-r));
+ log_debug_errno(-r, "Failed to parse PrepareForSleep signal: %m");
return 0;
}
@@ -717,11 +717,11 @@ int manager_connect_bus(Manager *m) {
* boot. Let's try in 5s again. As soon as we have
* kdbus we can stop doing this... */
- log_debug("Failed to connect to bus, trying again in 5s: %s", strerror(-r));
+ log_debug_errno(-r, "Failed to connect to bus, trying again in 5s: %m");
r = sd_event_add_time(m->event, &m->bus_retry_event_source, CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + 5*USEC_PER_SEC, 0, on_bus_retry, m);
if (r < 0) {
- log_error("Failed to install bus reconnect time event: %s", strerror(-r));
+ log_error_errno(-r, "Failed to install bus reconnect time event: %m");
return r;
}
@@ -730,19 +730,19 @@ int manager_connect_bus(Manager *m) {
r = sd_bus_add_object_vtable(m->bus, NULL, "/org/freedesktop/resolve1", "org.freedesktop.resolve1.Manager", resolve_vtable, m);
if (r < 0) {
- log_error("Failed to register object: %s", strerror(-r));
+ log_error_errno(-r, "Failed to register object: %m");
return r;
}
r = sd_bus_request_name(m->bus, "org.freedesktop.resolve1", 0);
if (r < 0) {
- log_error("Failed to register name: %s", strerror(-r));
+ log_error_errno(-r, "Failed to register name: %m");
return r;
}
r = sd_bus_attach_event(m->bus, m->event, 0);
if (r < 0) {
- log_error("Failed to attach bus to event loop: %s", strerror(-r));
+ log_error_errno(-r, "Failed to attach bus to event loop: %m");
return r;
}
@@ -755,7 +755,7 @@ int manager_connect_bus(Manager *m) {
match_prepare_for_sleep,
m);
if (r < 0)
- log_error("Failed to add match for PrepareForSleep: %s", strerror(-r));
+ log_error_errno(-r, "Failed to add match for PrepareForSleep: %m");
return 0;
}