2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 21:38:16 +00:00

zdtm: Don't forget to create /dev/ptmx in new root

Otherwise pty tests might fault.

Reported-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2012-10-02 23:08:02 +04:00 committed by Pavel Emelyanov
parent c6e0a402bc
commit 79d00c29c0

View File

@ -62,6 +62,10 @@ static int prepare_mntns()
fprintf(stderr, "mkdir(/dev) failed: %m\n");
return -1;
}
if (mknod("/dev/ptmx", 0666 | S_IFCHR, makedev(5, 2)) && errno != EEXIST) {
fprintf(stderr, "mknod(/dev/ptmx) failed: %m\n");
return -1;
}
if (mkdir("/dev/pts", 0755) && errno != EEXIST) {
fprintf(stderr, "mkdir(/dev/pts) failed: %m\n");
return -1;