Patchwork [9/9] default devices: global switch.

login
register
mail settings
Submitter Gerd Hoffmann
Date Nov. 17, 2009, 9:38 a.m.
Message ID <1258450699-24445-10-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/38604/
State New
Headers show

Comments

Gerd Hoffmann - Nov. 17, 2009, 9:38 a.m.
Add global switch to turn off all default devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-options.hx |    5 +++++
 vl.c            |    8 ++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index b65fd74..70929fa 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1878,6 +1878,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 eb07a5b..5954de0 100644
--- a/vl.c
+++ b/vl.c
@@ -5412,6 +5412,14 @@  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;
+                default_net = 0;
+                default_drive = 0;
+                break;
 #ifndef _WIN32
             case QEMU_OPTION_chroot:
                 chroot_dir = optarg;