Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
24654103
Commit
24654103
authored
Feb 24, 2010
by
Daniel Lezcano
Committed by
Daniel Lezcano
Feb 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename network type enum
Use a prefixed enum to avoid conflict later. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
872e1899
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
conf.c
src/lxc/conf.c
+7
-7
conf.h
src/lxc/conf.h
+6
-6
confile.c
src/lxc/confile.c
+5
-5
No files found.
src/lxc/conf.c
View file @
24654103
...
...
@@ -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
;
...
...
src/lxc/conf.h
View file @
24654103
...
...
@@ -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
,
};
/*
...
...
src/lxc/confile.c
View file @
24654103
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment