mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
qemu: Parse NBD storage source private data by virDomainStorageSourceParse
Drop the local call in favor of passing in xmlopt. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
79e3b15ce6
commit
670053326b
@ -2710,7 +2710,8 @@ qemuDomainObjPrivateXMLParsePR(xmlXPathContextPtr ctxt,
|
||||
static int
|
||||
qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
|
||||
xmlXPathContextPtr ctxt,
|
||||
virDomainDiskDefPtr disk)
|
||||
virDomainDiskDefPtr disk,
|
||||
virDomainXMLOptionPtr xmlopt)
|
||||
{
|
||||
VIR_XPATH_NODE_AUTORESTORE(ctxt);
|
||||
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
|
||||
@ -2745,11 +2746,7 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
|
||||
ctxt->node = sourceNode;
|
||||
|
||||
if (virDomainStorageSourceParse(ctxt->node, ctxt, migrSource,
|
||||
VIR_DOMAIN_DEF_PARSE_STATUS, NULL) < 0)
|
||||
return -1;
|
||||
|
||||
if ((ctxt->node = virXPathNode("./privateData", ctxt)) &&
|
||||
qemuStorageSourcePrivateDataParse(ctxt, migrSource) < 0)
|
||||
VIR_DOMAIN_DEF_PARSE_STATUS, xmlopt) < 0)
|
||||
return -1;
|
||||
|
||||
VIR_STEAL_PTR(diskPriv->migrSource, migrSource);
|
||||
@ -2785,7 +2782,8 @@ qemuDomainObjPrivateXMLParseJobNBD(virDomainObjPtr vm,
|
||||
QEMU_DOMAIN_DISK_PRIVATE(disk)->migrating = true;
|
||||
|
||||
if (qemuDomainObjPrivateXMLParseJobNBDSource(nodes[i], ctxt,
|
||||
disk) < 0)
|
||||
disk,
|
||||
priv->driver->xmlopt) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user