Commit b0691f81 by Michel Normand Committed by Daniel Lezcano

typo in 48862401 (V2)

without this correction, unable to create a container with a configuration file. This is a side effect of commit 48862401Signed-off-by: 's avatarMichel Normand <michel.mno@free.fr> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 07ede904
...@@ -230,7 +230,6 @@ static int console_init(char *console, size_t size) ...@@ -230,7 +230,6 @@ static int console_init(char *console, size_t size)
struct lxc_handler *lxc_init(const char *name, const char *rcfile) struct lxc_handler *lxc_init(const char *name, const char *rcfile)
{ {
struct lxc_handler *handler; struct lxc_handler *handler;
char path[MAXPATHLEN];
handler = malloc(sizeof(*handler)); handler = malloc(sizeof(*handler));
if (!handler) if (!handler)
...@@ -249,11 +248,13 @@ struct lxc_handler *lxc_init(const char *name, const char *rcfile) ...@@ -249,11 +248,13 @@ struct lxc_handler *lxc_init(const char *name, const char *rcfile)
goto out_aborting; goto out_aborting;
} }
if (rcfile && access(path, F_OK)) { if (rcfile) {
if (access(rcfile, F_OK)) {
ERROR("failed to access rcfile"); ERROR("failed to access rcfile");
goto out_aborting; goto out_aborting;
}
if (lxc_config_read(path, &handler->conf)) { if (lxc_config_read(rcfile, &handler->conf)) {
ERROR("failed to read the configuration file"); ERROR("failed to read the configuration file");
goto out_aborting; goto out_aborting;
} }
......
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