tun-fd option support for external tundev config (Rusty Russell)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@398 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
27c3f2cb9b
commit
42f1e0e49b
6
vl.c
6
vl.c
|
@ -3393,6 +3393,7 @@ void help(void)
|
||||||
"-snapshot write to temporary files instead of disk image files\n"
|
"-snapshot write to temporary files instead of disk image files\n"
|
||||||
"-m megs set virtual RAM size to megs MB\n"
|
"-m megs set virtual RAM size to megs MB\n"
|
||||||
"-n script set network init script [default=%s]\n"
|
"-n script set network init script [default=%s]\n"
|
||||||
|
"-tun-fd fd this fd talks to tap/tun, use it.\n"
|
||||||
"-nographic disable graphical output\n"
|
"-nographic disable graphical output\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Linux boot specific (does not require PC BIOS):\n"
|
"Linux boot specific (does not require PC BIOS):\n"
|
||||||
|
@ -3422,6 +3423,7 @@ struct option long_options[] = {
|
||||||
{ "nographic", 0, NULL, 0, },
|
{ "nographic", 0, NULL, 0, },
|
||||||
{ "kernel", 1, NULL, 0, },
|
{ "kernel", 1, NULL, 0, },
|
||||||
{ "append", 1, NULL, 0, },
|
{ "append", 1, NULL, 0, },
|
||||||
|
{ "tun-fd", 1, NULL, 0, },
|
||||||
{ NULL, 0, NULL, 0 },
|
{ NULL, 0, NULL, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3514,6 +3516,9 @@ int main(int argc, char **argv)
|
||||||
case 7:
|
case 7:
|
||||||
kernel_cmdline = optarg;
|
kernel_cmdline = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 8:
|
||||||
|
net_fd = atoi(optarg);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
|
@ -3568,6 +3573,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* init network tun interface */
|
/* init network tun interface */
|
||||||
|
if (net_fd < 0)
|
||||||
net_init();
|
net_init();
|
||||||
|
|
||||||
/* init the memory */
|
/* init the memory */
|
||||||
|
|
Loading…
Reference in a new issue