{_}lxc_start: remove "name" argument

as it's directly available in the handler itself. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 695d0e56
...@@ -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);
} }
...@@ -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
......
...@@ -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");
......
...@@ -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(const char *name, char *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,
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment