Commit bc9bd0e3 by Daniel Lezcano Committed by Daniel Lezcano

use the rootfs mount point for the tty's

The rootfs is always located in rootfs->mount, let's use it for the tty. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 466978b0
...@@ -386,12 +386,15 @@ static int setup_tty(const struct lxc_rootfs *rootfs, ...@@ -386,12 +386,15 @@ static int setup_tty(const struct lxc_rootfs *rootfs,
char path[MAXPATHLEN]; char path[MAXPATHLEN];
int i; int i;
if (!rootfs->path)
return 0;
for (i = 0; i < tty_info->nbtty; i++) { for (i = 0; i < tty_info->nbtty; i++) {
struct lxc_pty_info *pty_info = &tty_info->pty_info[i]; struct lxc_pty_info *pty_info = &tty_info->pty_info[i];
snprintf(path, sizeof(path), "%s/dev/tty%d", 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 /* At this point I can not use the "access" function
* to check the file is present or not because it fails * to check the file is present or not because it fails
......
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