summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-resolve
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 14:45:55 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 14:45:55 +0100
commit279d3c9cead3a7ffb657fedbab0e2bc90db45667 (patch)
tree563b8f326cdfe77c3f498d9a292834735f36b37b /src/libsystemd/sd-resolve
parentff49bc3212cb07d850dcfd59940539773a0be26f (diff)
treewide: more log_*_errno() conversions
Diffstat (limited to 'src/libsystemd/sd-resolve')
-rw-r--r--src/libsystemd/sd-resolve/test-resolve.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd/sd-resolve/test-resolve.c b/src/libsystemd/sd-resolve/test-resolve.c
index b7f8640231..a9dc9313a6 100644
--- a/src/libsystemd/sd-resolve/test-resolve.c
+++ b/src/libsystemd/sd-resolve/test-resolve.c
@@ -146,18 +146,18 @@ int main(int argc, char *argv[]) {
/* Make a name -> address query */
r = sd_resolve_getaddrinfo(resolve, &q1, argc >= 2 ? argv[1] : "www.heise.de", NULL, &hints, getaddrinfo_handler, NULL);
if (r < 0)
- log_error("sd_resolve_getaddrinfo(): %s", strerror(-r));
+ log_error_errno(r, "sd_resolve_getaddrinfo(): %m");
/* Make an address -> name query */
sa.sin_addr.s_addr = inet_addr(argc >= 3 ? argv[2] : "193.99.144.71");
r = sd_resolve_getnameinfo(resolve, &q2, (struct sockaddr*) &sa, sizeof(sa), 0, SD_RESOLVE_GET_BOTH, getnameinfo_handler, NULL);
if (r < 0)
- log_error("sd_resolve_getnameinfo(): %s", strerror(-r));
+ log_error_errno(r, "sd_resolve_getnameinfo(): %m");
/* Make a res_query() call */
r = sd_resolve_res_query(resolve, &q3, "_xmpp-client._tcp.gmail.com", C_IN, T_SRV, res_handler, NULL);
if (r < 0)
- log_error("sd_resolve_res_query(): %s", strerror(-r));
+ log_error_errno(r, "sd_resolve_res_query(): %m");
/* Wait until the three queries are completed */
while (sd_resolve_query_is_done(q1) == 0 ||
@@ -166,7 +166,7 @@ int main(int argc, char *argv[]) {
r = sd_resolve_wait(resolve, (uint64_t) -1);
if (r < 0) {
- log_error("sd_resolve_wait(): %s", strerror(-r));
+ log_error_errno(r, "sd_resolve_wait(): %m");
assert_not_reached("sd_resolve_wait() failed");
}
}