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
34c66a69
Commit
34c66a69
authored
May 28, 2009
by
Daniel Lezcano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old code to destroy the network
Removed this unused code. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
3f739da8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
66 deletions
+0
-66
configure.ac
configure.ac
+0
-8
conf.c
src/lxc/conf.c
+0
-58
No files found.
configure.ac
View file @
34c66a69
...
@@ -50,14 +50,6 @@ AC_ARG_WITH([kernel-release],
...
@@ -50,14 +50,6 @@ AC_ARG_WITH([kernel-release],
[KERNEL_RELEASE="${withval}"],
[KERNEL_RELEASE="${withval}"],
[KERNEL_RELEASE=`uname -r`])
[KERNEL_RELEASE=`uname -r`])
AX_COMPARE_VERSION([$KERNEL_RELEASE], [ge], [2.6.29],
AC_MSG_NOTICE([network autodestroy: yes]),
AC_MSG_NOTICE([network autodestroy: no]))
if test ${ax_compare_version} != "true"; then
CFLAGS="$CFLAGS -DNETWORK_DESTROY"
fi
AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
...
...
src/lxc/conf.c
View file @
34c66a69
...
@@ -1679,64 +1679,6 @@ int conf_create_network(const char *name, pid_t pid)
...
@@ -1679,64 +1679,6 @@ int conf_create_network(const char *name, pid_t pid)
return
0
;
return
0
;
}
}
#ifdef NETWORK_DESTROY
static
int
delete_netdev_cb
(
const
char
*
name
,
const
char
*
directory
,
const
char
*
file
,
void
*
data
)
{
char
strindex
[
MAXINDEXLEN
];
char
path
[
MAXPATHLEN
];
char
ifname
[
IFNAMSIZ
];
int
i
,
ifindex
;
snprintf
(
path
,
MAXPATHLEN
,
"%s/%s"
,
directory
,
file
);
if
(
read_info
(
path
,
"ifindex"
,
strindex
,
MAXINDEXLEN
))
{
ERROR
(
"failed to read ifindex info"
);
return
-
1
;
}
ifindex
=
atoi
(
strindex
);
if
(
!
ifindex
)
return
0
;
/* TODO : temporary code - needs wait on namespace */
for
(
i
=
0
;
i
<
120
;
i
++
)
{
if
(
if_indextoname
(
ifindex
,
ifname
))
break
;
if
(
!
i
)
printf
(
"waiting for interface #%d to come back
\n
"
,
ifindex
);
else
printf
(
"."
);
fflush
(
stdout
);
sleep
(
1
);
}
/* do not delete a physical network device */
if
(
strncmp
(
"phys"
,
file
,
strlen
(
"phys"
)))
if
(
lxc_device_delete
(
ifname
))
{
ERROR
(
"failed to remove the netdev %s"
,
ifname
);
}
delete_info
(
path
,
"ifindex"
);
return
0
;
}
#endif
int
conf_destroy_network
(
const
char
*
name
)
{
#ifdef NETWORK_DESTROY
char
directory
[
MAXPATHLEN
];
snprintf
(
directory
,
MAXPATHLEN
,
LXCPATH
"/%s/network"
,
name
);
if
(
lxc_dir_for_each
(
name
,
directory
,
delete_netdev_cb
,
NULL
))
{
ERROR
(
"failed to remove the network devices"
);
return
-
1
;
}
#endif
return
0
;
}
int
lxc_create_tty
(
const
char
*
name
,
struct
lxc_tty_info
*
tty_info
)
int
lxc_create_tty
(
const
char
*
name
,
struct
lxc_tty_info
*
tty_info
)
{
{
char
path
[
MAXPATHLEN
];
char
path
[
MAXPATHLEN
];
...
...
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