提交 5120577e 编写于 作者: J Ján Tomko

conf: add private data to virDomainFSDef

Add an object to hold the private data and call the
allocation function if it's present in xmlopt.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 a2430cc5
......@@ -2279,7 +2279,7 @@ virDomainControllerIsPSeriesPHB(const virDomainControllerDef *cont)
virDomainFSDefPtr
virDomainFSDefNew(virDomainXMLOptionPtr xmlopt G_GNUC_UNUSED)
virDomainFSDefNew(virDomainXMLOptionPtr xmlopt)
{
virDomainFSDefPtr ret;
......@@ -2289,6 +2289,11 @@ virDomainFSDefNew(virDomainXMLOptionPtr xmlopt G_GNUC_UNUSED)
if (!(ret->src = virStorageSourceNew()))
goto cleanup;
if (xmlopt &&
xmlopt->privateData.fsNew &&
!(ret->privateData = xmlopt->privateData.fsNew()))
goto cleanup;
return ret;
cleanup:
......
......@@ -817,6 +817,7 @@ struct _virDomainFSDef {
unsigned long long space_soft_limit; /* in bytes */
bool symlinksResolved;
virDomainVirtioOptionsPtr virtio;
virObjectPtr privateData;
};
......@@ -2740,6 +2741,7 @@ struct _virDomainXMLPrivateDataCallbacks {
virDomainXMLPrivateDataNewFunc graphicsNew;
virDomainXMLPrivateDataNewFunc networkNew;
virDomainXMLPrivateDataNewFunc videoNew;
virDomainXMLPrivateDataNewFunc fsNew;
virDomainXMLPrivateDataFormatFunc format;
virDomainXMLPrivateDataParseFunc parse;
/* following function shall return a pointer which will be used as the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册