]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc: remove unused lxc_bridge_detach
authorMichel Normand <normand@fr.ibm.com>
Thu, 29 Apr 2010 08:03:59 +0000 (10:03 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 29 Apr 2010 08:03:59 +0000 (10:03 +0200)
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/network.c
src/lxc/network.h

index f8cb8a465c05962814c9c3a971db2568b7b94c62..f1f0beb11126bb601ceaa46a22925f35b7183b72 100644 (file)
@@ -753,8 +753,11 @@ out:
        return err;
 }
 
-static int bridge_add_del_interface(const char *bridge,
-                                   const char *ifname, int detach)
+/*
+ * There is a lxc_bridge_attach, but no need of a bridge detach
+ * as automatically done by kernel when device deleted.
+ */
+int lxc_bridge_attach(const char *bridge, const char *ifname)
 {
        int fd, index, err;
        struct ifreq ifr;
@@ -772,20 +775,10 @@ static int bridge_add_del_interface(const char *bridge,
 
        strncpy(ifr.ifr_name, bridge, IFNAMSIZ);
        ifr.ifr_ifindex = index;
-       err = ioctl(fd, detach?SIOCBRDELIF:SIOCBRADDIF, &ifr);
+       err = ioctl(fd, SIOCBRADDIF, &ifr);
        close(fd);
        if (err)
                err = -errno;
 
        return err;
 }
-
-int lxc_bridge_attach(const char *bridge, const char *ifname)
-{
-       return bridge_add_del_interface(bridge, ifname, 0);
-}
-
-int lxc_bridge_detach(const char *bridge, const char *ifname)
-{
-       return bridge_add_del_interface(bridge, ifname, 1);
-}
index 59f2a4180b4f59d7cd896bf66b91d0f68928900f..0d743433e1871e38792edcc01499d4006a190915 100644 (file)
@@ -98,11 +98,6 @@ extern int lxc_ip_addr_add(int family, int ifindex, void *addr, int prefix);
  */
 extern int lxc_bridge_attach(const char *bridge, const char *ifname);
 
-/*
- * Detach an interface from the bridge
- */
-extern int lxc_bridge_detach(const char *bridge, const char *ifname);
-
 /* 
  * Create default gateway
  */