diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-08-21 00:07:05 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-08-21 00:29:30 +0200 |
commit | 021d39d3d19a910e195f8e68e7c86bb6ca1a5554 (patch) | |
tree | 115b347af96042597f63726ffa782c0eadaad318 /src/network/networkd-manager.c | |
parent | network: enter initialized state when the interface will be reconfigured (diff) | |
download | systemd-021d39d3d19a910e195f8e68e7c86bb6ca1a5554.tar.xz systemd-021d39d3d19a910e195f8e68e7c86bb6ca1a5554.zip |
network: log and enter failed state in link_reconfigure()
No functional change, just refactoring.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r-- | src/network/networkd-manager.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 6893ade66a..4ebecaac59 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -87,13 +87,8 @@ static int match_prepare_for_sleep(sd_bus_message *message, void *userdata, sd_b log_debug("Coming back from suspend, reconfiguring all connections..."); - HASHMAP_FOREACH(link, m->links_by_index) { - r = link_reconfigure(link, /* force = */ true); - if (r < 0) { - log_link_warning_errno(link, r, "Failed to reconfigure interface: %m"); - link_enter_failed(link); - } - } + HASHMAP_FOREACH(link, m->links_by_index) + (void) link_reconfigure(link, /* force = */ true); return 0; } @@ -1143,13 +1138,9 @@ int manager_reload(Manager *m, sd_bus_message *message) { HASHMAP_FOREACH(link, m->links_by_index) { if (message) - r = link_reconfigure_on_bus_method_reload(link, message); + (void) link_reconfigure_on_bus_method_reload(link, message); else - r = link_reconfigure(link, /* force = */ false); - if (r < 0) { - log_link_warning_errno(link, r, "Failed to reconfigure the interface: %m"); - link_enter_failed(link); - } + (void) link_reconfigure(link, /* force = */ false); } r = 0; |