mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 15:45:28 +00:00
virDomainDefParseNode: Introduce @parseOpaque argument
We want to pass the proper opaque pointer instead of NULL to virDomainDefParseXML and subsequently virDomainDefPostParse too. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
940d91c55b
commit
da6c604af2
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user