提交 2ccfbaa3 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
上级 b9b9195f
...@@ -1951,6 +1951,28 @@ qemuDomainObjPrivateFree(void *data) ...@@ -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 static void
qemuDomainObjPrivateXMLFormatVcpus(virBufferPtr buf, qemuDomainObjPrivateXMLFormatVcpus(virBufferPtr buf,
virDomainDefPtr def) virDomainDefPtr def)
...@@ -2538,8 +2560,8 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = { ...@@ -2538,8 +2560,8 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
.chrSourceNew = qemuDomainChrSourcePrivateNew, .chrSourceNew = qemuDomainChrSourcePrivateNew,
.parse = qemuDomainObjPrivateXMLParse, .parse = qemuDomainObjPrivateXMLParse,
.format = qemuDomainObjPrivateXMLFormat, .format = qemuDomainObjPrivateXMLFormat,
.storageParse = virStorageSourcePrivateDataParseRelPath, .storageParse = qemuStorageSourcePrivateDataParse,
.storageFormat = virStorageSourcePrivateDataFormatRelPath, .storageFormat = qemuStorageSourcePrivateDataFormat,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册