mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-23 15:37:24 +00:00
container: use symlink to replace link
/dev/pts/ptmx is on the different filesystem with /dev/ptmx, use symbol link. Signed-off-by: Gao feng <feng@hyper.sh>
This commit is contained in:
+4
-2
@@ -131,8 +131,10 @@ static int container_setup_mount(struct hyper_container *container)
|
||||
return -1;
|
||||
}
|
||||
|
||||
unlink("/dev/ptmx");
|
||||
link("/dev/pts/ptmx", "/dev/ptmx");
|
||||
if (unlink("/dev/ptmx") < 0)
|
||||
perror("remove /dev/ptmx failed");
|
||||
if (symlink("/dev/pts/ptmx", "/dev/ptmx") < 0)
|
||||
perror("link /dev/pts/ptmx to /dev/ptmx failed");
|
||||
|
||||
for (i = 0; i < container->maps_num; i++) {
|
||||
struct stat st;
|
||||
|
||||
Reference in New Issue
Block a user