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:
Martin Kletzander 2017-07-21 15:29:00 +02:00
parent 867bcc9c78
commit 6e6faf6d62
9 changed files with 10 additions and 9 deletions

View File

@ -33,7 +33,7 @@
VIR_LOG_INIT("bhyve.bhyve_domain");
static void *
bhyveDomainObjPrivateAlloc(void)
bhyveDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
{
bhyveDomainObjPrivatePtr priv;

View File

@ -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;
}

View File

@ -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,

View File

@ -206,7 +206,7 @@ libxlDomainJobUpdateTime(struct libxlDomainJobObj *job)
}
static void *
libxlDomainObjPrivateAlloc(void)
libxlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
{
libxlDomainObjPrivatePtr priv;

View File

@ -150,7 +150,7 @@ virLXCDomainObjEndJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
static void *
virLXCDomainObjPrivateAlloc(void)
virLXCDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
{
virLXCDomainObjPrivatePtr priv;

View File

@ -1662,7 +1662,7 @@ qemuDomainClearPrivatePaths(virDomainObjPtr vm)
static void *
qemuDomainObjPrivateAlloc(void)
qemuDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
{
qemuDomainObjPrivatePtr priv;

View File

@ -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;

View File

@ -60,7 +60,7 @@ vmwareDriverUnlock(struct vmware_driver *driver)
}
static void *
vmwareDataAllocFunc(void)
vmwareDataAllocFunc(void *opaque ATTRIBUTE_UNUSED)
{
vmwareDomainPtr dom;

View File

@ -581,7 +581,7 @@ int vzCheckUnsupportedGraphics(virDomainGraphicsDefPtr gr)
}
void*
vzDomObjAlloc(void)
vzDomObjAlloc(void *opaque ATTRIBUTE_UNUSED)
{
vzDomObjPtr pdom = NULL;