mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
a2430cc544
commit
5120577ed7
@ -2279,7 +2279,7 @@ virDomainControllerIsPSeriesPHB(const virDomainControllerDef *cont)
|
|||||||
|
|
||||||
|
|
||||||
virDomainFSDefPtr
|
virDomainFSDefPtr
|
||||||
virDomainFSDefNew(virDomainXMLOptionPtr xmlopt G_GNUC_UNUSED)
|
virDomainFSDefNew(virDomainXMLOptionPtr xmlopt)
|
||||||
{
|
{
|
||||||
virDomainFSDefPtr ret;
|
virDomainFSDefPtr ret;
|
||||||
|
|
||||||
@ -2289,6 +2289,11 @@ virDomainFSDefNew(virDomainXMLOptionPtr xmlopt G_GNUC_UNUSED)
|
|||||||
if (!(ret->src = virStorageSourceNew()))
|
if (!(ret->src = virStorageSourceNew()))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (xmlopt &&
|
||||||
|
xmlopt->privateData.fsNew &&
|
||||||
|
!(ret->privateData = xmlopt->privateData.fsNew()))
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
@ -817,6 +817,7 @@ struct _virDomainFSDef {
|
|||||||
unsigned long long space_soft_limit; /* in bytes */
|
unsigned long long space_soft_limit; /* in bytes */
|
||||||
bool symlinksResolved;
|
bool symlinksResolved;
|
||||||
virDomainVirtioOptionsPtr virtio;
|
virDomainVirtioOptionsPtr virtio;
|
||||||
|
virObjectPtr privateData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2740,6 +2741,7 @@ struct _virDomainXMLPrivateDataCallbacks {
|
|||||||
virDomainXMLPrivateDataNewFunc graphicsNew;
|
virDomainXMLPrivateDataNewFunc graphicsNew;
|
||||||
virDomainXMLPrivateDataNewFunc networkNew;
|
virDomainXMLPrivateDataNewFunc networkNew;
|
||||||
virDomainXMLPrivateDataNewFunc videoNew;
|
virDomainXMLPrivateDataNewFunc videoNew;
|
||||||
|
virDomainXMLPrivateDataNewFunc fsNew;
|
||||||
virDomainXMLPrivateDataFormatFunc format;
|
virDomainXMLPrivateDataFormatFunc format;
|
||||||
virDomainXMLPrivateDataParseFunc parse;
|
virDomainXMLPrivateDataParseFunc parse;
|
||||||
/* following function shall return a pointer which will be used as the
|
/* following function shall return a pointer which will be used as the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user