We want to by pass the proper opaque pointer instead of NULL to virDomainDefParseXML and subsequently virDomainDefPostParse too. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/conf/domain_conf.c | 10 ++++++---- src/conf/domain_conf.h | 1 + src/conf/snapshot_conf.c | 2 +- src/qemu/qemu_migration.c | 2 +- src/test/test_driver.c | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c8cb68f..430457e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15977,6 +15977,7 @@ virDomainDefParseXML(xmlDocPtr xml, xmlXPathContextPtr ctxt, virCapsPtr caps, virDomainXMLOptionPtr xmlopt, + void *parseOpaque, unsigned int flags) { xmlNodePtr *nodes = NULL, node = NULL; @@ -17628,7 +17629,7 @@ virDomainDefParseXML(xmlDocPtr xml, goto error; /* callback to fill driver specific domain aspects */ - if (virDomainDefPostParse(def, caps, flags, xmlopt, NULL) < 0) + if (virDomainDefPostParse(def, caps, flags, xmlopt, parseOpaque) < 0) goto error; /* valdiate configuration */ @@ -17677,7 +17678,7 @@ virDomainObjParseXML(xmlDocPtr xml, oldnode = ctxt->node; ctxt->node = config; - obj->def = virDomainDefParseXML(xml, config, ctxt, caps, xmlopt, flags); + obj->def = virDomainDefParseXML(xml, config, ctxt, caps, xmlopt, NULL, flags); ctxt->node = oldnode; if (!obj->def) goto error; @@ -17758,7 +17759,7 @@ virDomainDefParse(const char *xmlStr, if ((xml = virXMLParse(filename, xmlStr, _("(domain_definition)")))) { def = virDomainDefParseNode(xml, xmlDocGetRootElement(xml), caps, - xmlopt, flags); + xmlopt, NULL, flags); xmlFreeDoc(xml); } @@ -17790,6 +17791,7 @@ virDomainDefParseNode(xmlDocPtr xml, xmlNodePtr root, virCapsPtr caps, virDomainXMLOptionPtr xmlopt, + void *parseOpaque, unsigned int flags) { xmlXPathContextPtr ctxt = NULL; @@ -17810,7 +17812,7 @@ virDomainDefParseNode(xmlDocPtr xml, } ctxt->node = root; - def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt, flags); + def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt, parseOpaque, flags); cleanup: xmlXPathFreeContext(ctxt); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c61b364..ed44bc4 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2684,6 +2684,7 @@ virDomainDefPtr virDomainDefParseNode(xmlDocPtr doc, xmlNodePtr root, virCapsPtr caps, virDomainXMLOptionPtr xmlopt, + void *parseOpaque, unsigned int flags); virDomainObjPtr virDomainObjParseNode(xmlDocPtr xml, xmlNodePtr root, diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index c52c481..862c2ec 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -282,7 +282,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, goto cleanup; } def->dom = virDomainDefParseNode(ctxt->node->doc, domainNode, - caps, xmlopt, domainflags); + caps, xmlopt, NULL, domainflags); if (!def->dom) goto cleanup; } else { diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 8a220d9..fc73534 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1311,7 +1311,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig, goto error; } mig->persistent = virDomainDefParseNode(doc, nodes[0], - caps, driver->xmlopt, + caps, driver->xmlopt, NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE | VIR_DOMAIN_DEF_PARSE_ABI_UPDATE | VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE); diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7ef3d2f..054bb2e 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -875,7 +875,7 @@ testParseDomains(testDriverPtr privconn, goto error; def = virDomainDefParseNode(ctxt->doc, node, - privconn->caps, privconn->xmlopt, + privconn->caps, privconn->xmlopt, NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE); if (!def) goto error; -- 2.8.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list