]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
rename network type enum
authorDaniel Lezcano <daniel.lezcano@free.fr>
Wed, 24 Feb 2010 09:57:43 +0000 (10:57 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Wed, 24 Feb 2010 09:57:43 +0000 (10:57 +0100)
Use a prefixed enum to avoid conflict later.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c

index cb8fc8766e429fb2507221cad8239871e817ed7a..286eb7685220e5fcbb7bd4b046222e4fccd9afc5 100644 (file)
@@ -104,12 +104,12 @@ static int instanciate_vlan(struct lxc_netdev *);
 static int instanciate_phys(struct lxc_netdev *);
 static int instanciate_empty(struct lxc_netdev *);
 
-static  instanciate_cb netdev_conf[MAXCONFTYPE + 1] = {
-       [VETH]    = instanciate_veth,
-       [MACVLAN] = instanciate_macvlan,
-       [VLAN]    = instanciate_vlan,
-       [PHYS]    = instanciate_phys,
-       [EMPTY]   = instanciate_empty,
+static  instanciate_cb netdev_conf[LXC_NET_MAXCONFTYPE + 1] = {
+       [LXC_NET_VETH]    = instanciate_veth,
+       [LXC_NET_MACVLAN] = instanciate_macvlan,
+       [LXC_NET_VLAN]    = instanciate_vlan,
+       [LXC_NET_PHYS]    = instanciate_phys,
+       [LXC_NET_EMPTY]   = instanciate_empty,
 };
 
 static struct mount_opt mount_opt[] = {
@@ -1241,7 +1241,7 @@ int lxc_create_network(struct lxc_list *network)
 
                netdev = iterator->elem;
 
-               if (netdev->type < 0 || netdev->type > MAXCONFTYPE) {
+               if (netdev->type < 0 || netdev->type > LXC_NET_MAXCONFTYPE) {
                        ERROR("invalid network configuration type '%d'",
                              netdev->type);
                        return -1;
index f152defbe16597a39b48385dd650e537366c0670..b79dfe815111e316275c8e5f9a687939dcb64841 100644 (file)
 #include <lxc/list.h>
 
 enum {
-       EMPTY,
-       VETH,
-       MACVLAN,
-       PHYS,
-       VLAN,
-       MAXCONFTYPE,
+       LXC_NET_EMPTY,
+       LXC_NET_VETH,
+       LXC_NET_MACVLAN,
+       LXC_NET_PHYS,
+       LXC_NET_VLAN,
+       LXC_NET_MAXCONFTYPE,
 };
 
 /*
index d6a7abe222f955c6abd7c1107ca605c66d8b2d50..f56495623878bbcafff10dcc1444638bf0eaf999 100644 (file)
@@ -132,15 +132,15 @@ static int config_network_type(const char *key, char *value,
        lxc_list_add(network, list);
 
        if (!strcmp(value, "veth"))
-               netdev->type = VETH;
+               netdev->type = LXC_NET_VETH;
        else if (!strcmp(value, "macvlan"))
-               netdev->type = MACVLAN;
+               netdev->type = LXC_NET_MACVLAN;
        else if (!strcmp(value, "vlan"))
-               netdev->type = VLAN;
+               netdev->type = LXC_NET_VLAN;
        else if (!strcmp(value, "phys"))
-               netdev->type = PHYS;
+               netdev->type = LXC_NET_PHYS;
        else if (!strcmp(value, "empty"))
-               netdev->type = EMPTY;
+               netdev->type = LXC_NET_EMPTY;
        else {
                ERROR("invalid network type %s", value);
                return -1;