as it's directly available in the handler itself.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
TRACE("Doing lxc_execute");
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);
}
/*
* Start the specified command inside a system container
- * @name : the name of the container
* @argv : an array of char * corresponding to the command line
* @conf : configuration
* @daemonize : whether or not the container is daemonized
* Returns 0 on success, < 0 otherwise
*/
-extern int lxc_start(const char *name, char *const argv[],
- struct lxc_handler *handler, const char *lxcpath,
- bool daemonize, int *error_num);
+extern int lxc_start(char *const argv[], struct lxc_handler *handler,
+ const char *lxcpath, bool daemonize, int *error_num);
/*
* Start the specified command inside an application container
ret = lxc_execute(c->name, argv, 1, handler, c->config_path,
c->daemonize, &c->error_num);
else
- ret = lxc_start(c->name, argv, handler, c->config_path,
- c->daemonize, &c->error_num);
+ ret = lxc_start(argv, handler, c->config_path, c->daemonize,
+ &c->error_num);
if (conf->reboot == REBOOT_REQ) {
INFO("Container requested reboot");
return -1;
}
-int __lxc_start(const char *name, struct lxc_handler *handler,
- struct lxc_operations* ops, void *data, const char *lxcpath,
- bool daemonize, int *error_num)
+int __lxc_start(struct lxc_handler *handler, struct lxc_operations *ops,
+ void *data, const char *lxcpath, bool daemonize, int *error_num)
{
int ret, status;
+ const char *name = handler->name;
struct lxc_conf *conf = handler->conf;
struct cgroup_ops *cgroup_ops;
.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)
{
struct start_args start_arg = {
};
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,
*/
extern int lxc_check_inherited(struct lxc_conf *conf, bool closeall,
int *fds_to_ignore, size_t len_fds);
-extern int __lxc_start(const char *, struct lxc_handler *,
- struct lxc_operations *, void *, const char *, bool,
- int *);
+extern int __lxc_start(struct lxc_handler *, struct lxc_operations *, void *,
+ const char *, bool, int *);
extern int resolve_clone_flags(struct lxc_handler *handler);