Commit 9a366728 authored by Pavel Emelyanov's avatar Pavel Emelyanov

zdtm: Make /dev/net/tun optional device in test ns

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 79be3677
...@@ -366,13 +366,14 @@ static int construct_root() ...@@ -366,13 +366,14 @@ static int construct_root()
chmod("dev", 0777); chmod("dev", 0777);
mknod("dev/null", 0777 | S_IFCHR, makedev(1, 3)); mknod("dev/null", 0777 | S_IFCHR, makedev(1, 3));
chmod("dev/null", 0777); chmod("dev/null", 0777);
mkdir("dev/net", 0777); if (stat("/dev/net/tun", &st))
if (stat("/dev/net/tun", &st)) {
fprintf(stderr, "Unable to stat /dev/net/tun: %m"); fprintf(stderr, "Unable to stat /dev/net/tun: %m");
return -1; else {
} mkdir("dev/net", 0777);
mknod("dev/net/tun", 0777 | S_IFCHR, st.st_rdev); mknod("dev/net/tun", 0777 | S_IFCHR, st.st_rdev);
chmod("dev/net/tun", 0777); chmod("dev/net/tun", 0777);
}
if (stat("/dev/rtc", &st)) { if (stat("/dev/rtc", &st)) {
fprintf(stderr, "Unable to stat /dev/rtc: %m"); fprintf(stderr, "Unable to stat /dev/rtc: %m");
return -1; return -1;
......
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