mirror of
https://github.com/systemd/systemd.git
synced 2025-01-16 03:24:49 +03:00
networkd: fix logging of error codes
This commit is contained in:
parent
b710e6b68d
commit
36c7d7097b
@ -513,31 +513,31 @@ static int link_stop_clients(Link *link) {
|
||||
if (link->dhcp_client) {
|
||||
k = sd_dhcp_client_stop(link->dhcp_client);
|
||||
if (k < 0)
|
||||
r = log_link_warning_errno(link, r, "Could not stop DHCPv4 client: %m");
|
||||
r = log_link_warning_errno(link, k, "Could not stop DHCPv4 client: %m");
|
||||
}
|
||||
|
||||
if (link->ipv4ll) {
|
||||
k = sd_ipv4ll_stop(link->ipv4ll);
|
||||
if (k < 0)
|
||||
r = log_link_warning_errno(link, r, "Could not stop IPv4 link-local: %m");
|
||||
r = log_link_warning_errno(link, k, "Could not stop IPv4 link-local: %m");
|
||||
}
|
||||
|
||||
if (link->dhcp6_client) {
|
||||
k = sd_dhcp6_client_stop(link->dhcp6_client);
|
||||
if (k < 0)
|
||||
r = log_link_warning_errno(link, r, "Could not stop DHCPv6 client: %m");
|
||||
r = log_link_warning_errno(link, k, "Could not stop DHCPv6 client: %m");
|
||||
}
|
||||
|
||||
if (link->ndisc_router_discovery) {
|
||||
k = sd_ndisc_stop(link->ndisc_router_discovery);
|
||||
if (k < 0)
|
||||
r = log_link_warning_errno(link, r, "Could not stop IPv6 Router Discovery: %m");
|
||||
r = log_link_warning_errno(link, k, "Could not stop IPv6 Router Discovery: %m");
|
||||
}
|
||||
|
||||
if (link->lldp) {
|
||||
k = sd_lldp_stop(link->lldp);
|
||||
if (k < 0)
|
||||
r = log_link_warning_errno(link, r, "Could not stop LLDP: %m");
|
||||
r = log_link_warning_errno(link, k, "Could not stop LLDP: %m");
|
||||
}
|
||||
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user