mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
conf: Pass config.priv to xmlopt->privateData.alloc
This will help us to get to some data more easily. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
867bcc9c78
commit
6e6faf6d62
@ -33,7 +33,7 @@
|
||||
VIR_LOG_INIT("bhyve.bhyve_domain");
|
||||
|
||||
static void *
|
||||
bhyveDomainObjPrivateAlloc(void)
|
||||
bhyveDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
bhyveDomainObjPrivatePtr priv;
|
||||
|
||||
|
@ -3032,7 +3032,8 @@ virDomainObjNew(virDomainXMLOptionPtr xmlopt)
|
||||
}
|
||||
|
||||
if (xmlopt->privateData.alloc) {
|
||||
if (!(domain->privateData = (xmlopt->privateData.alloc)()))
|
||||
domain->privateData = (xmlopt->privateData.alloc)(xmlopt->config.priv);
|
||||
if (!domain->privateData)
|
||||
goto error;
|
||||
domain->privateDataFreeFunc = xmlopt->privateData.free;
|
||||
}
|
||||
|
@ -2562,7 +2562,7 @@ struct _virDomainDefParserConfig {
|
||||
unsigned char macPrefix[VIR_MAC_PREFIX_BUFLEN];
|
||||
};
|
||||
|
||||
typedef void *(*virDomainXMLPrivateDataAllocFunc)(void);
|
||||
typedef void *(*virDomainXMLPrivateDataAllocFunc)(void *);
|
||||
typedef void (*virDomainXMLPrivateDataFreeFunc)(void *);
|
||||
typedef virObjectPtr (*virDomainXMLPrivateDataNewFunc)(void);
|
||||
typedef int (*virDomainXMLPrivateDataFormatFunc)(virBufferPtr,
|
||||
|
@ -206,7 +206,7 @@ libxlDomainJobUpdateTime(struct libxlDomainJobObj *job)
|
||||
}
|
||||
|
||||
static void *
|
||||
libxlDomainObjPrivateAlloc(void)
|
||||
libxlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
libxlDomainObjPrivatePtr priv;
|
||||
|
||||
|
@ -150,7 +150,7 @@ virLXCDomainObjEndJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static void *
|
||||
virLXCDomainObjPrivateAlloc(void)
|
||||
virLXCDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
virLXCDomainObjPrivatePtr priv;
|
||||
|
||||
|
@ -1662,7 +1662,7 @@ qemuDomainClearPrivatePaths(virDomainObjPtr vm)
|
||||
|
||||
|
||||
static void *
|
||||
qemuDomainObjPrivateAlloc(void)
|
||||
qemuDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
|
||||
|
@ -90,7 +90,7 @@ static int umlProcessAutoDestroyRemove(struct uml_driver *driver,
|
||||
|
||||
static int umlStateCleanup(void);
|
||||
|
||||
static void *umlDomainObjPrivateAlloc(void)
|
||||
static void *umlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
umlDomainObjPrivatePtr priv;
|
||||
|
||||
|
@ -60,7 +60,7 @@ vmwareDriverUnlock(struct vmware_driver *driver)
|
||||
}
|
||||
|
||||
static void *
|
||||
vmwareDataAllocFunc(void)
|
||||
vmwareDataAllocFunc(void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
vmwareDomainPtr dom;
|
||||
|
||||
|
@ -581,7 +581,7 @@ int vzCheckUnsupportedGraphics(virDomainGraphicsDefPtr gr)
|
||||
}
|
||||
|
||||
void*
|
||||
vzDomObjAlloc(void)
|
||||
vzDomObjAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
vzDomObjPtr pdom = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user