From: Laine Stump Date: Fri, 6 Jun 2014 13:03:58 +0000 (+0300) Subject: qemu: ignore -nodefconfig and -nodefaults when parsing commandline X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a7b0040ad2b9e2c8e3cca7b9bd5a75d41d58a315;p=libvirt.git qemu: ignore -nodefconfig and -nodefaults when parsing commandline The qemu driver always adds these options to the qemu commandlines, but the commandline parser didn't recognize them, so sending a libvirt-generated qemu commandline to its own argvtoxml would always result in a warning message and a qemu namespace added to the xml. Since the options don't add any functionality to the domain, they should just be ignored (similar to -S). Note that we can't yet add a test for this to qemuargv2xmltest, because we would have to add QEMU_CAPS_NODEFCONFIG and QEMU_CAPS_DEVICE to the capabilities for any corresponding xml2argvtest, and QEMU_CAPS_DEVICE would necessitate having support for parsing a memballoon device in order for qemuargv2xmltest to pass. So we wait to add a test for -nodefconfig and -nodefaults until after adding support for parsing -device virtio-balloon-*. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3cf279e41e..2caee6665e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -11515,7 +11515,9 @@ qemuParseCommandLine(virCapsPtr qemuCaps, _("cannot parse nvram's address '%s'"), val); goto error; } - } else if (STREQ(arg, "-S")) { + } else if (STREQ(arg, "-S") || + STREQ(arg, "-nodefaults") || + STREQ(arg, "-nodefconfig")) { /* ignore, always added by libvirt */ } else { char *tmp = NULL;