mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +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
|
static int
|
||||||
qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
|
qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virDomainDiskDefPtr disk)
|
virDomainDiskDefPtr disk,
|
||||||
|
virDomainXMLOptionPtr xmlopt)
|
||||||
{
|
{
|
||||||
VIR_XPATH_NODE_AUTORESTORE(ctxt);
|
VIR_XPATH_NODE_AUTORESTORE(ctxt);
|
||||||
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
|
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
|
||||||
@ -2745,11 +2746,7 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
|
|||||||
ctxt->node = sourceNode;
|
ctxt->node = sourceNode;
|
||||||
|
|
||||||
if (virDomainStorageSourceParse(ctxt->node, ctxt, migrSource,
|
if (virDomainStorageSourceParse(ctxt->node, ctxt, migrSource,
|
||||||
VIR_DOMAIN_DEF_PARSE_STATUS, NULL) < 0)
|
VIR_DOMAIN_DEF_PARSE_STATUS, xmlopt) < 0)
|
||||||
return -1;
|
|
||||||
|
|
||||||
if ((ctxt->node = virXPathNode("./privateData", ctxt)) &&
|
|
||||||
qemuStorageSourcePrivateDataParse(ctxt, migrSource) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
VIR_STEAL_PTR(diskPriv->migrSource, migrSource);
|
VIR_STEAL_PTR(diskPriv->migrSource, migrSource);
|
||||||
@ -2785,7 +2782,8 @@ qemuDomainObjPrivateXMLParseJobNBD(virDomainObjPtr vm,
|
|||||||
QEMU_DOMAIN_DISK_PRIVATE(disk)->migrating = true;
|
QEMU_DOMAIN_DISK_PRIVATE(disk)->migrating = true;
|
||||||
|
|
||||||
if (qemuDomainObjPrivateXMLParseJobNBDSource(nodes[i], ctxt,
|
if (qemuDomainObjPrivateXMLParseJobNBDSource(nodes[i], ctxt,
|
||||||
disk) < 0)
|
disk,
|
||||||
|
priv->driver->xmlopt) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user