]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
typo in 488624016575d092d56211347b2bbe8367cd339a (V2)
authorMichel Normand <michel.mno@free.fr>
Fri, 13 Nov 2009 21:55:23 +0000 (22:55 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 13 Nov 2009 21:55:23 +0000 (22:55 +0100)
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 <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/start.c

index e190406a12bbb1a93dcc1d2a30b8ad2a1fe9a562..6537780303c6f16a90c858ac7bc187b96178c139 100644 (file)
@@ -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;
                }