]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: use log_link_warning_errno() or friends where applicable
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Feb 2022 17:14:12 +0000 (02:14 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 10 Feb 2022 08:34:06 +0000 (17:34 +0900)
src/network/networkd-link.c

index 5a4b0b5a55928103b886d5ae5b9d18eb8d3300f3..e4cb30debc328a83ffb6e94897619e1d56117483 100644 (file)
@@ -2516,7 +2516,7 @@ int manager_rtnl_process_link(sd_netlink *rtnl, sd_netlink_message *message, Man
                         /* netdev exists, so make sure the ifindex matches */
                         r = netdev_set_ifindex(netdev, message);
                         if (r < 0) {
-                                log_warning_errno(r, "Could not process new link message for netdev, ignoring: %m");
+                                log_netdev_warning_errno(netdev, r, "Could not process new link message for netdev, ignoring: %m");
                                 return 0;
                         }
                 }
@@ -2531,32 +2531,30 @@ int manager_rtnl_process_link(sd_netlink *rtnl, sd_netlink_message *message, Man
 
                         r = link_update(link, message);
                         if (r < 0) {
-                                log_warning_errno(r, "Could not process link message: %m");
+                                log_link_warning_errno(link, r, "Could not process link message: %m");
                                 link_enter_failed(link);
                                 return 0;
                         }
 
                         r = link_check_initialized(link);
                         if (r < 0) {
-                                log_warning_errno(r, "Failed to check link is initialized: %m");
+                                log_link_warning_errno(link, r, "Failed to check link is initialized: %m");
                                 link_enter_failed(link);
                                 return 0;
                         }
                 } else {
                         r = link_update(link, message);
                         if (r < 0) {
-                                log_warning_errno(r, "Could not process link message: %m");
+                                log_link_warning_errno(link, r, "Could not process link message: %m");
                                 link_enter_failed(link);
                                 return 0;
                         }
                 }
-
                 break;
 
         case RTM_DELLINK:
                 link_drop(link);
                 netdev_drop(netdev);
-
                 break;
 
         default: