]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: add error cause in the log
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 May 2019 13:54:15 +0000 (15:54 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 May 2019 15:12:09 +0000 (17:12 +0200)
src/network/networkd-dhcp4.c
src/network/networkd-ipv4ll.c

index 8d6769ca7e7f00b595a0a15cf27896628223db0d..01f4e955c85e9b899cf4e4b1c0e45866de9ec3b7 100644 (file)
@@ -533,7 +533,7 @@ static void dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
 
                                 r = sd_ipv4ll_start(link->ipv4ll);
                                 if (r < 0) {
-                                        log_link_warning(link, "Could not acquire IPv4 link-local address: %m");
+                                        log_link_warning_errno(link, r, "Could not acquire IPv4 link-local address: %m");
                                         return;
                                 }
                         }
index fb4bf266a6e124e977598014c76d6ef2008163d2..79e90f2f5af640b254857688144efd2cf92f8888 100644 (file)
@@ -175,7 +175,7 @@ static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
 
                         r = sd_ipv4ll_restart(ll);
                         if (r < 0)
-                                log_link_warning(link, "Could not acquire IPv4 link-local address");
+                                log_link_warning_errno(link, r, "Could not acquire IPv4 link-local address: %m");
                         break;
                 case SD_IPV4LL_EVENT_BIND:
                         r = ipv4ll_address_claimed(ll, link);