Patchwork [FOR,0.12,v3,10/21] default devices: add global cmd line option.

login
register
mail settings
Submitter Gerd Hoffmann
Date Dec. 7, 2009, 12:42 p.m.
Message ID <1260189773-20728-11-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/40484/
State New
Headers show

Comments

Gerd Hoffmann - Dec. 7, 2009, 12:42 p.m.
Add global command line option to disable default devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-options.hx |    5 +++++
 vl.c            |    6 ++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
Paolo Bonzini - Dec. 8, 2009, 12:46 p.m.
On 12/07/2009 01:42 PM, Gerd Hoffmann wrote:
> Add global command line option to disable default devices.

Should -readconfig imply this?

Paolo
Gerd Hoffmann - Dec. 8, 2009, 3:58 p.m.
On 12/08/09 13:46, Paolo Bonzini wrote:
> On 12/07/2009 01:42 PM, Gerd Hoffmann wrote:
>> Add global command line option to disable default devices.
>
> Should -readconfig imply this?

Hmm, not sure.  Why do you think this would be useful?

cheers,
   Gerd

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 a99e0fe..f02b333 100644
--- a/vl.c
+++ b/vl.c
@@ -5460,6 +5460,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;