On Mon, May 28, 2018 at 11:36:44AM +0200, Peter Krempa wrote:
There is only one block accessing it. Removing it is necessary so that post parse callbacks can later be invoked after the hypervisor private data callback so that e.g. qemuCaps are properly filled for the postparse callbacks. As the function signature of virDomainDefPostParseInternal does not differ from virDomainDefPostParse now, the wrapper can be dropped. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/conf/domain_conf.c | 62 +++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 38 deletions(-)
@@ -20502,9 +20474,23 @@ virDomainDefParseXML(xmlDocPtr xml, (def->ns.parse)(xml, root, ctxt, &def->namespaceData) < 0) goto error; + /* Fill in default boot device if none was present */ + if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { + if (def->os.nBootDevs > 0 && virHashSize(bootHash) > 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("per-device boot elements cannot be used" + " together with os/boot elements")); + goto error; + } + + if (def->os.nBootDevs == 0 && virHashSize(bootHash) == 0) { + def->os.nBootDevs = 1; + def->os.bootDevs[0] = VIR_DOMAIN_BOOT_DISK; + } + } +
I don't like moving this back into ParseXML. Can we remove it completely instead? https://www.redhat.com/archives/libvir-list/2018-May/msg02041.html cover.1527515594.git.jtomko@xxxxxxxxxx Jano
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list