network: do not log false friends

The netlink functions just return -1 and not specific negative errno values so logging them doesn't make any sense. Fixes: https://discuss.linuxcontainers.org/t/warning-in-the-container-log/4072/2Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 29a7b484
...@@ -2581,8 +2581,7 @@ bool lxc_delete_network_priv(struct lxc_handler *handler) ...@@ -2581,8 +2581,7 @@ bool lxc_delete_network_priv(struct lxc_handler *handler)
netdev->name[0] != '\0' ? netdev->name : "(null)", netdev->name[0] != '\0' ? netdev->name : "(null)",
netdev->ifindex); netdev->ifindex);
} else if (ret < 0) { } else if (ret < 0) {
errno = -ret; WARN("Failed to remove interface \"%s\" with index %d",
SYSWARN("Failed to remove interface \"%s\" with index %d",
netdev->name[0] != '\0' ? netdev->name : "(null)", netdev->name[0] != '\0' ? netdev->name : "(null)",
netdev->ifindex); netdev->ifindex);
goto clear_ifindices; goto clear_ifindices;
...@@ -2606,8 +2605,7 @@ bool lxc_delete_network_priv(struct lxc_handler *handler) ...@@ -2606,8 +2605,7 @@ bool lxc_delete_network_priv(struct lxc_handler *handler)
ret = lxc_netdev_delete_by_name(hostveth); ret = lxc_netdev_delete_by_name(hostveth);
if (ret < 0) { if (ret < 0) {
errno = -ret; WARN("Failed to remove interface \"%s\" from \"%s\"",
SYSWARN("Failed to remove interface \"%s\" from \"%s\"",
hostveth, netdev->link); hostveth, netdev->link);
goto clear_ifindices; goto clear_ifindices;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment