This will help us to get to some data more easily. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- src/bhyve/bhyve_domain.c | 2 +- src/conf/domain_conf.c | 3 ++- src/conf/domain_conf.h | 2 +- src/libxl/libxl_domain.c | 2 +- src/lxc/lxc_domain.c | 2 +- src/qemu/qemu_domain.c | 2 +- src/uml/uml_driver.c | 2 +- src/vmware/vmware_driver.c | 2 +- src/vz/vz_utils.c | 2 +- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index 71764554eb11..3c2344196949 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -33,7 +33,7 @@ VIR_LOG_INIT("bhyve.bhyve_domain"); static void * -bhyveDomainObjPrivateAlloc(void) +bhyveDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { bhyveDomainObjPrivatePtr priv; diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d8b3c9b65cd6..2231b195b9c4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4fef773efd93..dfc51208a029 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -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, diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 68a501cf1664..7caa6747494a 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -206,7 +206,7 @@ libxlDomainJobUpdateTime(struct libxlDomainJobObj *job) } static void * -libxlDomainObjPrivateAlloc(void) +libxlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { libxlDomainObjPrivatePtr priv; diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c index 3a7404f407c9..7c1386e40c82 100644 --- a/src/lxc/lxc_domain.c +++ b/src/lxc/lxc_domain.c @@ -150,7 +150,7 @@ virLXCDomainObjEndJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED, static void * -virLXCDomainObjPrivateAlloc(void) +virLXCDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { virLXCDomainObjPrivatePtr priv; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2c8c9a74542b..f1e144d92b64 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1662,7 +1662,7 @@ qemuDomainClearPrivatePaths(virDomainObjPtr vm) static void * -qemuDomainObjPrivateAlloc(void) +qemuDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { qemuDomainObjPrivatePtr priv; diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 224b71984250..1846835cc659 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -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; diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 0ee1c5bb983b..8b487c4a7ce0 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -60,7 +60,7 @@ vmwareDriverUnlock(struct vmware_driver *driver) } static void * -vmwareDataAllocFunc(void) +vmwareDataAllocFunc(void *opaque ATTRIBUTE_UNUSED) { vmwareDomainPtr dom; diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index a6d7b93cbc50..770b499c9286 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -581,7 +581,7 @@ int vzCheckUnsupportedGraphics(virDomainGraphicsDefPtr gr) } void* -vzDomObjAlloc(void) +vzDomObjAlloc(void *opaque ATTRIBUTE_UNUSED) { vzDomObjPtr pdom = NULL; -- 2.13.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list