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
e0f59189
Commit
e0f59189
authored
Oct 15, 2014
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxccontainer.c: rename enter_to_ns to enter_net_ns
because that's what it does Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
ea467969
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lxccontainer.c
src/lxc/lxccontainer.c
+4
-4
No files found.
src/lxc/lxccontainer.c
View file @
e0f59189
...
@@ -1477,7 +1477,7 @@ static bool lxcapi_clear_config_item(struct lxc_container *c, const char *key)
...
@@ -1477,7 +1477,7 @@ static bool lxcapi_clear_config_item(struct lxc_container *c, const char *key)
return
ret
==
0
;
return
ret
==
0
;
}
}
static
inline
bool
enter_
to
_ns
(
struct
lxc_container
*
c
)
static
inline
bool
enter_
net
_ns
(
struct
lxc_container
*
c
)
{
{
pid_t
pid
=
c
->
init_pid
(
c
);
pid_t
pid
=
c
->
init_pid
(
c
);
...
@@ -1586,7 +1586,7 @@ static char** lxcapi_get_interfaces(struct lxc_container *c)
...
@@ -1586,7 +1586,7 @@ static char** lxcapi_get_interfaces(struct lxc_container *c)
/* close the read-end of the pipe */
/* close the read-end of the pipe */
close
(
pipefd
[
0
]);
close
(
pipefd
[
0
]);
if
(
!
enter_
to
_ns
(
c
))
{
if
(
!
enter_
net
_ns
(
c
))
{
SYSERROR
(
"failed to enter namespace"
);
SYSERROR
(
"failed to enter namespace"
);
goto
out
;
goto
out
;
}
}
...
@@ -1676,7 +1676,7 @@ static char** lxcapi_get_ips(struct lxc_container *c, const char* interface, con
...
@@ -1676,7 +1676,7 @@ static char** lxcapi_get_ips(struct lxc_container *c, const char* interface, con
/* close the read-end of the pipe */
/* close the read-end of the pipe */
close
(
pipefd
[
0
]);
close
(
pipefd
[
0
]);
if
(
!
enter_
to
_ns
(
c
))
{
if
(
!
enter_
net
_ns
(
c
))
{
SYSERROR
(
"failed to enter namespace"
);
SYSERROR
(
"failed to enter namespace"
);
goto
out
;
goto
out
;
}
}
...
@@ -3489,7 +3489,7 @@ static bool lxcapi_detach_interface(struct lxc_container *c, const char *ifname,
...
@@ -3489,7 +3489,7 @@ static bool lxcapi_detach_interface(struct lxc_container *c, const char *ifname,
if
(
pid
==
0
)
{
// child
if
(
pid
==
0
)
{
// child
int
ret
=
0
;
int
ret
=
0
;
if
(
!
enter_
to
_ns
(
c
))
{
if
(
!
enter_
net
_ns
(
c
))
{
ERROR
(
"failed to enter namespace"
);
ERROR
(
"failed to enter namespace"
);
exit
(
-
1
);
exit
(
-
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