提交 a7b0040a 编写于 作者: L Laine Stump

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-*.
上级 b7b3fb56
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册