mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: Add qemu functions for storage source private data handling
The qemu driver registered the helpers from util code, but it will be necessary to format also some qemu-specific data. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
b9b9195f15
commit
2ccfbaa356
@ -1951,6 +1951,28 @@ qemuDomainObjPrivateFree(void *data)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
qemuStorageSourcePrivateDataParse(xmlXPathContextPtr ctxt,
|
||||
virStorageSourcePtr src)
|
||||
{
|
||||
if (virStorageSourcePrivateDataParseRelPath(ctxt, src) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
qemuStorageSourcePrivateDataFormat(virStorageSourcePtr src,
|
||||
virBufferPtr buf)
|
||||
{
|
||||
if (virStorageSourcePrivateDataFormatRelPath(src, buf) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuDomainObjPrivateXMLFormatVcpus(virBufferPtr buf,
|
||||
virDomainDefPtr def)
|
||||
@ -2538,8 +2560,8 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
|
||||
.chrSourceNew = qemuDomainChrSourcePrivateNew,
|
||||
.parse = qemuDomainObjPrivateXMLParse,
|
||||
.format = qemuDomainObjPrivateXMLFormat,
|
||||
.storageParse = virStorageSourcePrivateDataParseRelPath,
|
||||
.storageFormat = virStorageSourcePrivateDataFormatRelPath,
|
||||
.storageParse = qemuStorageSourcePrivateDataParse,
|
||||
.storageFormat = qemuStorageSourcePrivateDataFormat,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user