]> git.proxmox.com Git - mirror_lxc.git/commitdiff
use the rootfs mount point for the console
authorDaniel Lezcano <daniel.lezcano@free.fr>
Sun, 3 Oct 2010 21:09:35 +0000 (23:09 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Sun, 3 Oct 2010 21:09:35 +0000 (23:09 +0200)
The rootfs is always located in the mount point now, let's
use it.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/conf.c

index aae52f458c39cb4d4f8b6f1d6a5c46fa5b079315..775583789058eb800f5941fbe9023de953c8735e 100644 (file)
@@ -690,10 +690,11 @@ static int setup_console(const struct lxc_rootfs *rootfs,
        if (!rootfs->path)
                return 0;
 
-       snprintf(path, sizeof(path), "%s/dev/console", rootfs->path);
+       snprintf(path, sizeof(path), "%s/dev/console",
+                rootfs->mount ? rootfs->mount : LXCROOTFSMOUNT);
 
        if (access(path, F_OK)) {
-               WARN("rootfs specified but no console found");
+               WARN("rootfs specified but no console found at '%s'", path);
                return 0;
        }