From: Christian Brauner Date: Fri, 15 Feb 2019 22:50:34 +0000 (+0100) Subject: network: do not log false friends X-Git-Tag: lxc-3.2.0~147^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24548539af7fa95cd9ca7b971eb9f301065492e0;p=thirdparty%2Flxc.git 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/2 Signed-off-by: Christian Brauner --- diff --git a/src/lxc/network.c b/src/lxc/network.c index e05c56615..fd7d867fc 100644 --- a/src/lxc/network.c +++ b/src/lxc/network.c @@ -2581,10 +2581,9 @@ bool lxc_delete_network_priv(struct lxc_handler *handler) netdev->name[0] != '\0' ? netdev->name : "(null)", netdev->ifindex); } else if (ret < 0) { - errno = -ret; - SYSWARN("Failed to remove interface \"%s\" with index %d", - netdev->name[0] != '\0' ? netdev->name : "(null)", - netdev->ifindex); + WARN("Failed to remove interface \"%s\" with index %d", + netdev->name[0] != '\0' ? netdev->name : "(null)", + netdev->ifindex); goto clear_ifindices; } INFO("Removed interface \"%s\" with index %d", @@ -2606,9 +2605,8 @@ bool lxc_delete_network_priv(struct lxc_handler *handler) ret = lxc_netdev_delete_by_name(hostveth); if (ret < 0) { - errno = -ret; - SYSWARN("Failed to remove interface \"%s\" from \"%s\"", - hostveth, netdev->link); + WARN("Failed to remove interface \"%s\" from \"%s\"", + hostveth, netdev->link); goto clear_ifindices; } INFO("Removed interface \"%s\" from \"%s\"", hostveth, netdev->link);