X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fresolve%2Fresolved-link.c;h=f94e4bb6f058252fbbbef8489bdc5e12871d7861;hb=fa639f3ae770ffccdd9f97430b0883d01bc821ce;hp=f47017ced849948da2fb7a2787c2a880859daba8;hpb=bda2c408f8a739c19161818bcc842107f60652a2;p=elogind.git diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c index f47017ced..f94e4bb6f 100644 --- a/src/resolve/resolved-link.c +++ b/src/resolve/resolved-link.c @@ -33,7 +33,7 @@ int link_new(Manager *m, Link **ret, int ifindex) { assert(m); assert(ifindex > 0); - r = hashmap_ensure_allocated(&m->links, NULL, NULL); + r = hashmap_ensure_allocated(&m->links, NULL); if (r < 0) return r; @@ -88,7 +88,7 @@ static void link_allocate_scopes(Link *l) { if (!l->unicast_scope) { r = dns_scope_new(l->manager, &l->unicast_scope, l, DNS_PROTOCOL_DNS, AF_UNSPEC); if (r < 0) - log_warning("Failed to allocate DNS scope: %s", strerror(-r)); + log_warning_errno(r, "Failed to allocate DNS scope: %m"); } } else l->unicast_scope = dns_scope_free(l->unicast_scope); @@ -99,7 +99,7 @@ static void link_allocate_scopes(Link *l) { if (!l->llmnr_ipv4_scope) { r = dns_scope_new(l->manager, &l->llmnr_ipv4_scope, l, DNS_PROTOCOL_LLMNR, AF_INET); if (r < 0) - log_warning("Failed to allocate LLMNR IPv4 scope: %s", strerror(-r)); + log_warning_errno(r, "Failed to allocate LLMNR IPv4 scope: %m"); } } else l->llmnr_ipv4_scope = dns_scope_free(l->llmnr_ipv4_scope); @@ -111,7 +111,7 @@ static void link_allocate_scopes(Link *l) { if (!l->llmnr_ipv6_scope) { r = dns_scope_new(l->manager, &l->llmnr_ipv6_scope, l, DNS_PROTOCOL_LLMNR, AF_INET6); if (r < 0) - log_warning("Failed to allocate LLMNR IPv6 scope: %s", strerror(-r)); + log_warning_errno(r, "Failed to allocate LLMNR IPv6 scope: %m"); } } else l->llmnr_ipv6_scope = dns_scope_free(l->llmnr_ipv6_scope); @@ -439,11 +439,11 @@ void link_address_add_rrs(LinkAddress *a, bool force_remove) { r = dns_zone_put(&a->link->llmnr_ipv4_scope->zone, a->link->llmnr_ipv4_scope, a->llmnr_address_rr, true); if (r < 0) - log_warning("Failed to add A record to LLMNR zone: %s", strerror(-r)); + log_warning_errno(r, "Failed to add A record to LLMNR zone: %m"); r = dns_zone_put(&a->link->llmnr_ipv4_scope->zone, a->link->llmnr_ipv4_scope, a->llmnr_ptr_rr, false); if (r < 0) - log_warning("Failed to add IPv6 PTR record to LLMNR zone: %s", strerror(-r)); + log_warning_errno(r, "Failed to add IPv6 PTR record to LLMNR zone: %m"); } else { if (a->llmnr_address_rr) { if (a->link->llmnr_ipv4_scope) @@ -496,11 +496,11 @@ void link_address_add_rrs(LinkAddress *a, bool force_remove) { r = dns_zone_put(&a->link->llmnr_ipv6_scope->zone, a->link->llmnr_ipv6_scope, a->llmnr_address_rr, true); if (r < 0) - log_warning("Failed to add AAAA record to LLMNR zone: %s", strerror(-r)); + log_warning_errno(r, "Failed to add AAAA record to LLMNR zone: %m"); r = dns_zone_put(&a->link->llmnr_ipv6_scope->zone, a->link->llmnr_ipv6_scope, a->llmnr_ptr_rr, false); if (r < 0) - log_warning("Failed to add IPv6 PTR record to LLMNR zone: %s", strerror(-r)); + log_warning_errno(r, "Failed to add IPv6 PTR record to LLMNR zone: %m"); } else { if (a->llmnr_address_rr) { if (a->link->llmnr_ipv6_scope) @@ -519,7 +519,7 @@ void link_address_add_rrs(LinkAddress *a, bool force_remove) { return; fail: - log_debug("Failed to update address RRs: %s", strerror(-r)); + log_debug_errno(r, "Failed to update address RRs: %m"); } int link_address_update_rtnl(LinkAddress *a, sd_rtnl_message *m) {