From: Michel Normand Date: Fri, 13 Nov 2009 21:55:23 +0000 (+0100) Subject: typo in 488624016575d092d56211347b2bbe8367cd339a (V2) X-Git-Tag: lxc_0_6_4~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0691f8179557405fe1c8ac4b9fc458ea1bff954;p=thirdparty%2Flxc.git typo in 488624016575d092d56211347b2bbe8367cd339a (V2) without this correction, unable to create a container with a configuration file. This is a side effect of commit 488624016575d092d56211347b2bbe8367cd339a Signed-off-by: Michel Normand Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/start.c b/src/lxc/start.c index e190406a1..653778030 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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 *handler; - char path[MAXPATHLEN]; handler = malloc(sizeof(*handler)); if (!handler) @@ -249,11 +248,13 @@ struct lxc_handler *lxc_init(const char *name, const char *rcfile) goto out_aborting; } - if (rcfile && access(path, F_OK)) { - ERROR("failed to access rcfile"); - goto out_aborting; + if (rcfile) { + if (access(rcfile, F_OK)) { + ERROR("failed to access rcfile"); + goto out_aborting; + } - if (lxc_config_read(path, &handler->conf)) { + if (lxc_config_read(rcfile, &handler->conf)) { ERROR("failed to read the configuration file"); goto out_aborting; }