1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

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-*.
This commit is contained in:
Laine Stump 2014-06-06 16:03:58 +03:00
parent b7b3fb56f5
commit a7b0040ad2

View File

@ -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;