Use a prefixed enum to avoid conflict later.

Signed-off-by: Daniel Lezcano <dlezc...@fr.ibm.com>
---
 src/lxc/conf.c    |   14 +++++++-------
 src/lxc/conf.h    |   12 ++++++------
 src/lxc/confile.c |   10 +++++-----
 3 files changed, 18 insertions(+), 18 deletions(-)

Index: lxc/src/lxc/conf.c
===================================================================
--- lxc.orig/src/lxc/conf.c
+++ lxc/src/lxc/conf.c
@@ -104,12 +104,12 @@ static int instanciate_vlan(struct lxc_n
 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 *
 
                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: lxc/src/lxc/conf.h
===================================================================
--- lxc.orig/src/lxc/conf.h
+++ lxc/src/lxc/conf.h
@@ -29,12 +29,12 @@
 #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: lxc/src/lxc/confile.c
===================================================================
--- lxc.orig/src/lxc/confile.c
+++ lxc/src/lxc/confile.c
@@ -132,15 +132,15 @@ static int config_network_type(const cha
        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;


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to