From nobody Fri May 16 05:09:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1500905405022226.62080235914414; Mon, 24 Jul 2017 07:10:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DEB26C001CCB; Mon, 24 Jul 2017 14:09:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B628F89F2C; Mon, 24 Jul 2017 14:09:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5F38814B24; Mon, 24 Jul 2017 14:09:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6OE9jEL007552 for ; Mon, 24 Jul 2017 10:09:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 521E061F2F; Mon, 24 Jul 2017 14:09:45 +0000 (UTC) Received: from caroline.brq.redhat.com (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB9EC87CB4 for ; Mon, 24 Jul 2017 14:09:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DEB26C001CCB Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com DEB26C001CCB From: Martin Kletzander To: libvir-list@redhat.com Date: Mon, 24 Jul 2017 16:09:31 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] conf: Pass config.priv to xmlopt->privateData.alloc X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 24 Jul 2017 14:09:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This will help us to get to some data more easily. Signed-off-by: Martin Kletzander --- 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"); =20 static void * -bhyveDomainObjPrivateAlloc(void) +bhyveDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { bhyveDomainObjPrivatePtr priv; =20 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) } =20 if (xmlopt->privateData.alloc) { - if (!(domain->privateData =3D (xmlopt->privateData.alloc)())) + domain->privateData =3D (xmlopt->privateData.alloc)(xmlopt->config= .priv); + if (!domain->privateData) goto error; domain->privateDataFreeFunc =3D 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]; }; =20 -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) } =20 static void * -libxlDomainObjPrivateAlloc(void) +libxlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { libxlDomainObjPrivatePtr priv; =20 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, =20 =20 static void * -virLXCDomainObjPrivateAlloc(void) +virLXCDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { virLXCDomainObjPrivatePtr priv; =20 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) =20 =20 static void * -qemuDomainObjPrivateAlloc(void) +qemuDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { qemuDomainObjPrivatePtr priv; =20 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, =20 static int umlStateCleanup(void); =20 -static void *umlDomainObjPrivateAlloc(void) +static void *umlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { umlDomainObjPrivatePtr priv; =20 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) } =20 static void * -vmwareDataAllocFunc(void) +vmwareDataAllocFunc(void *opaque ATTRIBUTE_UNUSED) { vmwareDomainPtr dom; =20 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) } =20 void* -vzDomObjAlloc(void) +vzDomObjAlloc(void *opaque ATTRIBUTE_UNUSED) { vzDomObjPtr pdom =3D NULL; =20 --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list