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
7d163508
Commit
7d163508
authored
Apr 29, 2010
by
Michel Normand
Committed by
Daniel Lezcano
Apr 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc: remove unused lxc_bridge_detach
Signed-off-by:
Michel Normand
<
normand@fr.ibm.com
>
Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
3cfc0f3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
network.c
src/lxc/network.c
+6
-13
network.h
src/lxc/network.h
+0
-5
No files found.
src/lxc/network.c
View file @
7d163508
...
@@ -753,8 +753,11 @@ out:
...
@@ -753,8 +753,11 @@ out:
return
err
;
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
;
int
fd
,
index
,
err
;
struct
ifreq
ifr
;
struct
ifreq
ifr
;
...
@@ -772,20 +775,10 @@ static int bridge_add_del_interface(const char *bridge,
...
@@ -772,20 +775,10 @@ static int bridge_add_del_interface(const char *bridge,
strncpy
(
ifr
.
ifr_name
,
bridge
,
IFNAMSIZ
);
strncpy
(
ifr
.
ifr_name
,
bridge
,
IFNAMSIZ
);
ifr
.
ifr_ifindex
=
index
;
ifr
.
ifr_ifindex
=
index
;
err
=
ioctl
(
fd
,
detach
?
SIOCBRDELIF
:
SIOCBRADDIF
,
&
ifr
);
err
=
ioctl
(
fd
,
SIOCBRADDIF
,
&
ifr
);
close
(
fd
);
close
(
fd
);
if
(
err
)
if
(
err
)
err
=
-
errno
;
err
=
-
errno
;
return
err
;
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
);
}
src/lxc/network.h
View file @
7d163508
...
@@ -98,11 +98,6 @@ extern int lxc_ip_addr_add(int family, int ifindex, void *addr, int prefix);
...
@@ -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
);
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
* Create default gateway
*/
*/
...
...
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