diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkctl.c | 10 | ||||
-rw-r--r-- | src/network/networkd-address.c | 20 | ||||
-rw-r--r-- | src/network/networkd-manager.c | 4 | ||||
-rw-r--r-- | src/network/networkd-netdev-veth.c | 2 | ||||
-rw-r--r-- | src/network/networkd-netdev.c | 2 | ||||
-rw-r--r-- | src/network/networkd-network.c | 2 | ||||
-rw-r--r-- | src/network/networkd-route.c | 36 | ||||
-rw-r--r-- | src/network/networkd-wait-online-manager.c | 4 | ||||
-rw-r--r-- | src/network/networkd-wait-online.c | 4 | ||||
-rw-r--r-- | src/network/networkd.c | 16 |
10 files changed, 50 insertions, 50 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 3e21d9acb8..2754ed8d3e 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -191,7 +191,7 @@ static int list_links(char **args, unsigned n) { r = sd_rtnl_open(&rtnl, 0); if (r < 0) { - log_error_errno(-r, "Failed to connect to netlink: %m"); + log_error_errno(r, "Failed to connect to netlink: %m"); return r; } @@ -211,7 +211,7 @@ static int list_links(char **args, unsigned n) { r = sd_rtnl_call(rtnl, req, 0, &reply); if (r < 0) { - log_error_errno(-r, "Failed to enumerate links: %m"); + log_error_errno(r, "Failed to enumerate links: %m"); return r; } @@ -323,7 +323,7 @@ static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) { r = sd_rtnl_call(rtnl, req, 0, &reply); if (r < 0) { - log_error_errno(-r, "Failed to query link: %m"); + log_error_errno(r, "Failed to query link: %m"); return r; } @@ -448,7 +448,7 @@ static int link_status(char **args, unsigned n) { r = sd_rtnl_open(&rtnl, 0); if (r < 0) { - log_error_errno(-r, "Failed to connect to netlink: %m"); + log_error_errno(r, "Failed to connect to netlink: %m"); return r; } @@ -514,7 +514,7 @@ static int link_status(char **args, unsigned n) { r = sd_rtnl_call(rtnl, req, 0, &reply); if (r < 0) { - log_error_errno(-r, "Failed to enumerate links: %m"); + log_error_errno(r, "Failed to enumerate links: %m"); return r; } diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index b85044d292..e95184b8ff 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -125,7 +125,7 @@ int address_drop(Address *address, Link *link, r = sd_rtnl_message_addr_set_prefixlen(req, address->prefixlen); if (r < 0) { - log_error_errno(-r, "Could not set prefixlen: %m"); + log_error_errno(r, "Could not set prefixlen: %m"); return r; } @@ -141,7 +141,7 @@ int address_drop(Address *address, Link *link, r = sd_rtnl_call_async(link->manager->rtnl, req, callback, link, 0, NULL); if (r < 0) { - log_error_errno(-r, "Could not send rtnetlink message: %m"); + log_error_errno(r, "Could not send rtnetlink message: %m"); return r; } @@ -171,19 +171,19 @@ int address_update(Address *address, Link *link, r = sd_rtnl_message_addr_set_prefixlen(req, address->prefixlen); if (r < 0) { - log_error_errno(-r, "Could not set prefixlen: %m"); + log_error_errno(r, "Could not set prefixlen: %m"); return r; } r = sd_rtnl_message_addr_set_flags(req, IFA_F_PERMANENT); if (r < 0) { - log_error_errno(-r, "Could not set flags: %m"); + log_error_errno(r, "Could not set flags: %m"); return r; } r = sd_rtnl_message_addr_set_scope(req, address->scope); if (r < 0) { - log_error_errno(-r, "Could not set scope: %m"); + log_error_errno(r, "Could not set scope: %m"); return r; } @@ -224,7 +224,7 @@ int address_update(Address *address, Link *link, r = sd_rtnl_call_async(link->manager->rtnl, req, callback, link, 0, NULL); if (r < 0) { - log_error_errno(-r, "Could not send rtnetlink message: %m"); + log_error_errno(r, "Could not send rtnetlink message: %m"); return r; } @@ -320,19 +320,19 @@ int address_configure(Address *address, Link *link, r = sd_rtnl_message_addr_set_prefixlen(req, address->prefixlen); if (r < 0) { - log_error_errno(-r, "Could not set prefixlen: %m"); + log_error_errno(r, "Could not set prefixlen: %m"); return r; } r = sd_rtnl_message_addr_set_flags(req, IFA_F_PERMANENT); if (r < 0) { - log_error_errno(-r, "Could not set flags: %m"); + log_error_errno(r, "Could not set flags: %m"); return r; } r = sd_rtnl_message_addr_set_scope(req, address->scope); if (r < 0) { - log_error_errno(-r, "Could not set scope: %m"); + log_error_errno(r, "Could not set scope: %m"); return r; } @@ -386,7 +386,7 @@ int address_configure(Address *address, Link *link, r = sd_rtnl_call_async(link->manager->rtnl, req, callback, link, 0, NULL); if (r < 0) { - log_error_errno(-r, "Could not send rtnetlink message: %m"); + log_error_errno(r, "Could not send rtnetlink message: %m"); return r; } diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index e2190b591e..98a12c277a 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -357,7 +357,7 @@ int manager_udev_listen(Manager *m) { r = udev_monitor_filter_add_match_subsystem_devtype(m->udev_monitor, "net", NULL); if (r < 0) { - log_error_errno(-r, "Could not add udev monitor filter: %m"); + log_error_errno(r, "Could not add udev monitor filter: %m"); return r; } @@ -597,7 +597,7 @@ int manager_save(Manager *m) { return 0; fail: - log_error_errno(-r, "Failed to save network state to %s: %m", m->state_file); + log_error_errno(r, "Failed to save network state to %s: %m", m->state_file); unlink(m->state_file); unlink(temp_path); return r; diff --git a/src/network/networkd-netdev-veth.c b/src/network/networkd-netdev-veth.c index ed43e1b2a9..46f98e0925 100644 --- a/src/network/networkd-netdev-veth.c +++ b/src/network/networkd-netdev-veth.c @@ -47,7 +47,7 @@ static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m if (v->ifname_peer) { r = sd_rtnl_message_append_string(m, IFLA_IFNAME, v->ifname_peer); if (r < 0) { - log_error_errno(-r, "Failed to add netlink interface name: %m"); + log_error_errno(r, "Failed to add netlink interface name: %m"); return r; } } diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c index 071ca4dcc5..7f717171ca 100644 --- a/src/network/networkd-netdev.c +++ b/src/network/networkd-netdev.c @@ -744,7 +744,7 @@ int netdev_load(Manager *manager) { r = conf_files_list_strv(&files, ".netdev", NULL, network_dirs); if (r < 0) { - log_error_errno(-r, "Failed to enumerate netdev files: %m"); + log_error_errno(r, "Failed to enumerate netdev files: %m"); return r; } diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 79b8e75eba..151aa12cb7 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -132,7 +132,7 @@ int network_load(Manager *manager) { r = conf_files_list_strv(&files, ".network", NULL, network_dirs); if (r < 0) { - log_error_errno(-r, "Failed to enumerate network files: %m"); + log_error_errno(r, "Failed to enumerate network files: %m"); return r; } diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 6db1bcffbd..058f887ebf 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -114,7 +114,7 @@ int route_drop(Route *route, Link *link, RTM_DELROUTE, route->family, route->protocol); if (r < 0) { - log_error_errno(-r, "Could not create RTM_DELROUTE message: %m"); + log_error_errno(r, "Could not create RTM_DELROUTE message: %m"); return r; } @@ -124,7 +124,7 @@ int route_drop(Route *route, Link *link, else if (route->family == AF_INET6) r = sd_rtnl_message_append_in6_addr(req, RTA_GATEWAY, &route->in_addr.in6); if (r < 0) { - log_error_errno(-r, "Could not append RTA_GATEWAY attribute: %m"); + log_error_errno(r, "Could not append RTA_GATEWAY attribute: %m"); return r; } } @@ -135,13 +135,13 @@ int route_drop(Route *route, Link *link, else if (route->family == AF_INET6) r = sd_rtnl_message_append_in6_addr(req, RTA_DST, &route->dst_addr.in6); if (r < 0) { - log_error_errno(-r, "Could not append RTA_DST attribute: %m"); + log_error_errno(r, "Could not append RTA_DST attribute: %m"); return r; } r = sd_rtnl_message_route_set_dst_prefixlen(req, route->dst_prefixlen); if (r < 0) { - log_error_errno(-r, "Could not set destination prefix length: %m"); + log_error_errno(r, "Could not set destination prefix length: %m"); return r; } } @@ -152,32 +152,32 @@ int route_drop(Route *route, Link *link, else if (route->family == AF_INET6) r = sd_rtnl_message_append_in6_addr(req, RTA_PREFSRC, &route->prefsrc_addr.in6); if (r < 0) { - log_error_errno(-r, "Could not append RTA_PREFSRC attribute: %m"); + log_error_errno(r, "Could not append RTA_PREFSRC attribute: %m"); return r; } } r = sd_rtnl_message_route_set_scope(req, route->scope); if (r < 0) { - log_error_errno(-r, "Could not set scope: %m"); + log_error_errno(r, "Could not set scope: %m"); return r; } r = sd_rtnl_message_append_u32(req, RTA_PRIORITY, route->metrics); if (r < 0) { - log_error_errno(-r, "Could not append RTA_PRIORITY attribute: %m"); + log_error_errno(r, "Could not append RTA_PRIORITY attribute: %m"); return r; } r = sd_rtnl_message_append_u32(req, RTA_OIF, link->ifindex); if (r < 0) { - log_error_errno(-r, "Could not append RTA_OIF attribute: %m"); + log_error_errno(r, "Could not append RTA_OIF attribute: %m"); return r; } r = sd_rtnl_call_async(link->manager->rtnl, req, callback, link, 0, NULL); if (r < 0) { - log_error_errno(-r, "Could not send rtnetlink message: %m"); + log_error_errno(r, "Could not send rtnetlink message: %m"); return r; } @@ -201,7 +201,7 @@ int route_configure(Route *route, Link *link, RTM_NEWROUTE, route->family, route->protocol); if (r < 0) { - log_error_errno(-r, "Could not create RTM_NEWROUTE message: %m"); + log_error_errno(r, "Could not create RTM_NEWROUTE message: %m"); return r; } @@ -211,7 +211,7 @@ int route_configure(Route *route, Link *link, else if (route->family == AF_INET6) r = sd_rtnl_message_append_in6_addr(req, RTA_GATEWAY, &route->in_addr.in6); if (r < 0) { - log_error_errno(-r, "Could not append RTA_GATEWAY attribute: %m"); + log_error_errno(r, "Could not append RTA_GATEWAY attribute: %m"); return r; } } @@ -222,13 +222,13 @@ int route_configure(Route *route, Link *link, else if (route->family == AF_INET6) r = sd_rtnl_message_append_in6_addr(req, RTA_DST, &route->dst_addr.in6); if (r < 0) { - log_error_errno(-r, "Could not append RTA_DST attribute: %m"); + log_error_errno(r, "Could not append RTA_DST attribute: %m"); return r; } r = sd_rtnl_message_route_set_dst_prefixlen(req, route->dst_prefixlen); if (r < 0) { - log_error_errno(-r, "Could not set destination prefix length: %m"); + log_error_errno(r, "Could not set destination prefix length: %m"); return r; } } @@ -239,32 +239,32 @@ int route_configure(Route *route, Link *link, else if (route->family == AF_INET6) r = sd_rtnl_message_append_in6_addr(req, RTA_PREFSRC, &route->prefsrc_addr.in6); if (r < 0) { - log_error_errno(-r, "Could not append RTA_PREFSRC attribute: %m"); + log_error_errno(r, "Could not append RTA_PREFSRC attribute: %m"); return r; } } r = sd_rtnl_message_route_set_scope(req, route->scope); if (r < 0) { - log_error_errno(-r, "Could not set scope: %m"); + log_error_errno(r, "Could not set scope: %m"); return r; } r = sd_rtnl_message_append_u32(req, RTA_PRIORITY, route->metrics); if (r < 0) { - log_error_errno(-r, "Could not append RTA_PRIORITY attribute: %m"); + log_error_errno(r, "Could not append RTA_PRIORITY attribute: %m"); return r; } r = sd_rtnl_message_append_u32(req, RTA_OIF, link->ifindex); if (r < 0) { - log_error_errno(-r, "Could not append RTA_OIF attribute: %m"); + log_error_errno(r, "Could not append RTA_OIF attribute: %m"); return r; } r = sd_rtnl_call_async(link->manager->rtnl, req, callback, link, 0, NULL); if (r < 0) { - log_error_errno(-r, "Could not send rtnetlink message: %m"); + log_error_errno(r, "Could not send rtnetlink message: %m"); return r; } diff --git a/src/network/networkd-wait-online-manager.c b/src/network/networkd-wait-online-manager.c index 0cdc4f8811..3f2b96688c 100644 --- a/src/network/networkd-wait-online-manager.c +++ b/src/network/networkd-wait-online-manager.c @@ -134,7 +134,7 @@ static int manager_process_link(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userda return 0; fail: - log_warning_errno(-r, "Failed to process RTNL link message: %m"); + log_warning_errno(r, "Failed to process RTNL link message: %m"); return 0; } @@ -211,7 +211,7 @@ static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void * HASHMAP_FOREACH(l, m->links, i) { r = link_update_monitor(l); if (r < 0) - log_warning_errno(-r, "Failed to update monitor information for %i: %m", l->ifindex); + log_warning_errno(r, "Failed to update monitor information for %i: %m", l->ifindex); } if (manager_all_configured(m)) diff --git a/src/network/networkd-wait-online.c b/src/network/networkd-wait-online.c index 40c89653b3..32a8d85301 100644 --- a/src/network/networkd-wait-online.c +++ b/src/network/networkd-wait-online.c @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) { r = manager_new(&m, arg_interfaces); if (r < 0) { - log_error_errno(-r, "Could not create manager: %m"); + log_error_errno(r, "Could not create manager: %m"); goto finish; } @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) { r = sd_event_loop(m->event); if (r < 0) { - log_error_errno(-r, "Event loop failed: %m"); + log_error_errno(r, "Event loop failed: %m"); goto finish; } diff --git a/src/network/networkd.c b/src/network/networkd.c index 1020c72525..fe5860411d 100644 --- a/src/network/networkd.c +++ b/src/network/networkd.c @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) { r = get_user_creds(&user, &uid, &gid, NULL, NULL); if (r < 0) { - log_error_errno(-r, "Cannot resolve user name %s: %m", user); + log_error_errno(r, "Cannot resolve user name %s: %m", user); goto out; } @@ -79,37 +79,37 @@ int main(int argc, char *argv[]) { r = manager_new(&m); if (r < 0) { - log_error_errno(-r, "Could not create manager: %m"); + log_error_errno(r, "Could not create manager: %m"); goto out; } r = manager_udev_listen(m); if (r < 0) { - log_error_errno(-r, "Could not connect to udev: %m"); + log_error_errno(r, "Could not connect to udev: %m"); goto out; } r = manager_rtnl_listen(m); if (r < 0) { - log_error_errno(-r, "Could not connect to rtnl: %m"); + log_error_errno(r, "Could not connect to rtnl: %m"); goto out; } r = manager_bus_listen(m); if (r < 0) { - log_error_errno(-r, "Could not connect to system bus: %m"); + log_error_errno(r, "Could not connect to system bus: %m"); goto out; } r = manager_load_config(m); if (r < 0) { - log_error_errno(-r, "Could not load configuration files: %m"); + log_error_errno(r, "Could not load configuration files: %m"); goto out; } r = manager_rtnl_enumerate_links(m); if (r < 0) { - log_error_errno(-r, "Could not enumerate links: %m"); + log_error_errno(r, "Could not enumerate links: %m"); goto out; } @@ -119,7 +119,7 @@ int main(int argc, char *argv[]) { r = sd_event_loop(m->event); if (r < 0) { - log_error_errno(-r, "Event loop failed: %m"); + log_error_errno(r, "Event loop failed: %m"); goto out; } |