]> git.proxmox.com Git - mirror_lxc.git/commitdiff
use the rootfs mount point for the tty's
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 rootfs->mount, let's use it for
the tty.

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

index 775583789058eb800f5941fbe9023de953c8735e..3da522f840830edc4d20103031f04dfeaf663131 100644 (file)
@@ -386,12 +386,15 @@ static int setup_tty(const struct lxc_rootfs *rootfs,
        char path[MAXPATHLEN];
        int i;
 
+       if (!rootfs->path)
+               return 0;
+
        for (i = 0; i < tty_info->nbtty; i++) {
 
                struct lxc_pty_info *pty_info = &tty_info->pty_info[i];
 
                snprintf(path, sizeof(path), "%s/dev/tty%d",
-                        rootfs->path ? rootfs->path : "", i + 1);
+                        rootfs->mount ? rootfs->mount : LXCROOTFSMOUNT, i + 1);
 
                /* At this point I can not use the "access" function
                 * to check the file is present or not because it fails