]> git.proxmox.com Git - lxc.git/commitdiff
show error message when deleting an interface failed
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 22 Oct 2015 08:26:51 +0000 (10:26 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 22 Oct 2015 10:07:40 +0000 (12:07 +0200)
debian/patches/delete_network_show_error.diff [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/delete_network_show_error.diff b/debian/patches/delete_network_show_error.diff
new file mode 100644 (file)
index 0000000..1c8892c
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+index 0e3421b..91c90b1 100644
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -3083,9 +3083,13 @@ void lxc_delete_network(struct lxc_handler *handler)
+                * namespace is destroyed but in case we did not moved the
+                * interface to the network namespace, we have to destroy it
+                */
+-              if (netdev->ifindex != 0 &&
+-                  lxc_netdev_delete_by_index(netdev->ifindex))
+-                      WARN("failed to remove interface '%s'", netdev->name);
++              if (netdev->ifindex != 0) {
++                      int err = lxc_netdev_delete_by_index(netdev->ifindex);
++                      if (err) {
++                              WARN("failed to remove interface '%s': %i: %s", netdev->name,
++                                   err, strerror(-err));
++                      }
++              }
+       }
+ }
index 235086bdec6d3c4de4f49145799464fab5d1c855..7c870d1b53e268cd0a01bc261e70fc2f79df831d 100644 (file)
@@ -12,3 +12,4 @@ run-lxcnetaddbr.patch
 0004-document-the-stop-hook.patch
 0005-added-the-unmount-namespace-hook.patch
 0006-hooks-put-binary-hooks-in-usr-lib-lxc-hooks.patch
+delete_network_show_error.diff