default devices: add global cmd line option.
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 8 Dec 2009 12:11:46 +0000 (13:11 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Sat, 12 Dec 2009 13:59:43 +0000 (07:59 -0600)
Add global command line option to disable default devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-options.hx
vl.c

index 420b7d8..e05b2a0 100644 (file)
@@ -1881,6 +1881,11 @@ DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
 STEXI
 ETEXI
 
+DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
+    "-nodefaults     don't create default devices.\n")
+STEXI
+ETEXI
+
 #ifndef _WIN32
 DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
     "-chroot dir     Chroot to dir just before starting the VM.\n")
diff --git a/vl.c b/vl.c
index 444f414..69b577f 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -5471,6 +5471,12 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_incoming:
                 incoming = optarg;
                 break;
+            case QEMU_OPTION_nodefaults:
+                default_serial = 0;
+                default_parallel = 0;
+                default_monitor = 0;
+                default_vga = 0;
+                break;
 #ifndef _WIN32
             case QEMU_OPTION_chroot:
                 chroot_dir = optarg;