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
7bdf97d2
Unverified
Commit
7bdf97d2
authored
Mar 15, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{_}lxc_start: remove "name" argument
as it's directly available in the handler itself. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
695d0e56
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
15 deletions
+12
-15
execute.c
src/lxc/execute.c
+1
-1
lxc.h
src/lxc/lxc.h
+2
-4
lxccontainer.c
src/lxc/lxccontainer.c
+2
-2
start.c
src/lxc/start.c
+5
-5
start.h
src/lxc/start.h
+2
-3
No files found.
src/lxc/execute.c
View file @
7bdf97d2
...
@@ -96,6 +96,6 @@ int lxc_execute(const char *name, char *const argv[], int quiet,
...
@@ -96,6 +96,6 @@ int lxc_execute(const char *name, char *const argv[], int quiet,
TRACE
(
"Doing lxc_execute"
);
TRACE
(
"Doing lxc_execute"
);
handler
->
conf
->
is_execute
=
true
;
handler
->
conf
->
is_execute
=
true
;
return
__lxc_start
(
name
,
handler
,
&
execute_start_ops
,
&
args
,
lxcpath
,
return
__lxc_start
(
handler
,
&
execute_start_ops
,
&
args
,
lxcpath
,
daemonize
,
error_num
);
daemonize
,
error_num
);
}
}
src/lxc/lxc.h
View file @
7bdf97d2
...
@@ -27,15 +27,13 @@ struct lxc_handler;
...
@@ -27,15 +27,13 @@ struct lxc_handler;
/*
/*
* Start the specified command inside a system container
* Start the specified command inside a system container
* @name : the name of the container
* @argv : an array of char * corresponding to the command line
* @argv : an array of char * corresponding to the command line
* @conf : configuration
* @conf : configuration
* @daemonize : whether or not the container is daemonized
* @daemonize : whether or not the container is daemonized
* Returns 0 on success, < 0 otherwise
* Returns 0 on success, < 0 otherwise
*/
*/
extern
int
lxc_start
(
const
char
*
name
,
char
*
const
argv
[],
extern
int
lxc_start
(
char
*
const
argv
[],
struct
lxc_handler
*
handler
,
struct
lxc_handler
*
handler
,
const
char
*
lxcpath
,
const
char
*
lxcpath
,
bool
daemonize
,
int
*
error_num
);
bool
daemonize
,
int
*
error_num
);
/*
/*
* Start the specified command inside an application container
* Start the specified command inside an application container
...
...
src/lxc/lxccontainer.c
View file @
7bdf97d2
...
@@ -1117,8 +1117,8 @@ reboot:
...
@@ -1117,8 +1117,8 @@ reboot:
ret
=
lxc_execute
(
c
->
name
,
argv
,
1
,
handler
,
c
->
config_path
,
ret
=
lxc_execute
(
c
->
name
,
argv
,
1
,
handler
,
c
->
config_path
,
c
->
daemonize
,
&
c
->
error_num
);
c
->
daemonize
,
&
c
->
error_num
);
else
else
ret
=
lxc_start
(
c
->
name
,
argv
,
handler
,
c
->
config_path
,
ret
=
lxc_start
(
argv
,
handler
,
c
->
config_path
,
c
->
daemonize
,
c
->
daemonize
,
&
c
->
error_num
);
&
c
->
error_num
);
if
(
conf
->
reboot
==
REBOOT_REQ
)
{
if
(
conf
->
reboot
==
REBOOT_REQ
)
{
INFO
(
"Container requested reboot"
);
INFO
(
"Container requested reboot"
);
...
...
src/lxc/start.c
View file @
7bdf97d2
...
@@ -1879,11 +1879,11 @@ out_sync_fini:
...
@@ -1879,11 +1879,11 @@ out_sync_fini:
return
-
1
;
return
-
1
;
}
}
int
__lxc_start
(
const
char
*
name
,
struct
lxc_handler
*
handler
,
int
__lxc_start
(
struct
lxc_handler
*
handler
,
struct
lxc_operations
*
ops
,
struct
lxc_operations
*
ops
,
void
*
data
,
const
char
*
lxcpath
,
void
*
data
,
const
char
*
lxcpath
,
bool
daemonize
,
int
*
error_num
)
bool
daemonize
,
int
*
error_num
)
{
{
int
ret
,
status
;
int
ret
,
status
;
const
char
*
name
=
handler
->
name
;
struct
lxc_conf
*
conf
=
handler
->
conf
;
struct
lxc_conf
*
conf
=
handler
->
conf
;
struct
cgroup_ops
*
cgroup_ops
;
struct
cgroup_ops
*
cgroup_ops
;
...
@@ -2052,7 +2052,7 @@ static struct lxc_operations start_ops = {
...
@@ -2052,7 +2052,7 @@ static struct lxc_operations start_ops = {
.
post_start
=
post_start
.
post_start
=
post_start
};
};
int
lxc_start
(
c
onst
char
*
name
,
c
har
*
const
argv
[],
struct
lxc_handler
*
handler
,
int
lxc_start
(
char
*
const
argv
[],
struct
lxc_handler
*
handler
,
const
char
*
lxcpath
,
bool
daemonize
,
int
*
error_num
)
const
char
*
lxcpath
,
bool
daemonize
,
int
*
error_num
)
{
{
struct
start_args
start_arg
=
{
struct
start_args
start_arg
=
{
...
@@ -2060,7 +2060,7 @@ int lxc_start(const char *name, char *const argv[], struct lxc_handler *handler,
...
@@ -2060,7 +2060,7 @@ int lxc_start(const char *name, char *const argv[], struct lxc_handler *handler,
};
};
TRACE
(
"Doing lxc_start"
);
TRACE
(
"Doing lxc_start"
);
return
__lxc_start
(
name
,
handler
,
&
start_ops
,
&
start_arg
,
lxcpath
,
daemonize
,
error_num
);
return
__lxc_start
(
handler
,
&
start_ops
,
&
start_arg
,
lxcpath
,
daemonize
,
error_num
);
}
}
static
void
lxc_destroy_container_on_signal
(
struct
lxc_handler
*
handler
,
static
void
lxc_destroy_container_on_signal
(
struct
lxc_handler
*
handler
,
...
...
src/lxc/start.h
View file @
7bdf97d2
...
@@ -161,9 +161,8 @@ extern void lxc_fini(const char *name, struct lxc_handler *handler);
...
@@ -161,9 +161,8 @@ extern void lxc_fini(const char *name, struct lxc_handler *handler);
*/
*/
extern
int
lxc_check_inherited
(
struct
lxc_conf
*
conf
,
bool
closeall
,
extern
int
lxc_check_inherited
(
struct
lxc_conf
*
conf
,
bool
closeall
,
int
*
fds_to_ignore
,
size_t
len_fds
);
int
*
fds_to_ignore
,
size_t
len_fds
);
extern
int
__lxc_start
(
const
char
*
,
struct
lxc_handler
*
,
extern
int
__lxc_start
(
struct
lxc_handler
*
,
struct
lxc_operations
*
,
void
*
,
struct
lxc_operations
*
,
void
*
,
const
char
*
,
bool
,
const
char
*
,
bool
,
int
*
);
int
*
);
extern
int
resolve_clone_flags
(
struct
lxc_handler
*
handler
);
extern
int
resolve_clone_flags
(
struct
lxc_handler
*
handler
);
...
...
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