From nobody Tue Nov 26 16:30:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571793978; cv=none; d=zoho.com; s=zohoarc; b=QR62TNTabsy3wRp6RGlF27HxE72mHO4np0M4cf6x3YkL+murAacyzu3VCIAzXDoI4BwwIMDGX3Zp7xF4t9SN3f7lZJ2QJWeZYfjdGhJ7X+fXt03IBSeayJAcWvz6WQ/p4cfMhwidNrAprb2fnN4dKM4fKpR82V8QPfljV/FN7o0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571793978; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lXj+pr259B1kvu2h70NDyxg8bwpI3yt50v9mons7g7s=; b=hP3FRf3BNlqUpTWguXO/NUkTvrUoZyPMsp8m5ZLo+USSTJNF5fnk0Z79WLfD7ryLmVMYGhg+Ig8VyvY+eSh3Z1MmKMtckFNn6M8DNeJdgyNruiAAMLZIt6IorXEez8Ywqq9ik8ZTfbFuQehA4xsEMa4ARX9nerEIbqq1uyTuYyU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1571793978088608.0005081201919; Tue, 22 Oct 2019 18:26:18 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-xf1ZTGlKPribqdIB91JQrg-1; Tue, 22 Oct 2019 21:26:13 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C925B107AD33; Wed, 23 Oct 2019 01:26:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BB4C19C70; Wed, 23 Oct 2019 01:26:07 +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 4B90C180B761; Wed, 23 Oct 2019 01:26:07 +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 x9N1OTaJ030890 for ; Tue, 22 Oct 2019 21:24:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 636555D6C8; Wed, 23 Oct 2019 01:24:29 +0000 (UTC) Received: from vhost2.laine.org (ovpn-117-114.phx2.redhat.com [10.3.117.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D2B05D6B2 for ; Wed, 23 Oct 2019 01:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571793976; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lXj+pr259B1kvu2h70NDyxg8bwpI3yt50v9mons7g7s=; b=VJO3vAt+XXdkxPyK9MwGizq0u6SLkcQcz5ouLYZjW+r8T/P+vEZJ/NA7XeZRG7XaM/b2SG AA/dAVEZiBfrfki1DHBi7k2rx8RPoLbPyVUVRQXWqdenesLk7i/pQM0bd3uplsdrr36Tkn pSloe2KszydHUwrO0973aRGCxjsm8eU= From: Laine Stump To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 21:24:17 -0400 Message-Id: <20191023012420.21128-5-laine@redhat.com> In-Reply-To: <20191023012420.21128-1-laine@redhat.com> References: <20191023012420.21128-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/7] conf: return a const from virDomainNetGetActualVirtPortProfile 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: xf1ZTGlKPribqdIB91JQrg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This also isn't required (due to the vportprofile being stored in the NetDef as a pointer rather than being directly contained), but it seemed dishonest to not mark it as const (and thus permit users to modify its contents) Signed-off-by: Laine Stump --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- src/conf/netdev_vport_profile_conf.c | 2 +- src/conf/netdev_vport_profile_conf.h | 2 +- src/libxl/libxl_conf.c | 2 +- src/libxl/xen_common.c | 2 +- src/lxc/lxc_driver.c | 2 +- src/lxc/lxc_process.c | 8 ++++---- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_migration_cookie.c | 2 +- src/qemu/qemu_process.c | 2 +- src/util/virhostdev.c | 6 +++--- src/util/virnetdevmacvlan.c | 16 ++++++++-------- src/util/virnetdevmacvlan.h | 8 ++++---- src/util/virnetdevmidonet.c | 4 ++-- src/util/virnetdevmidonet.h | 4 ++-- src/util/virnetdevopenvswitch.c | 2 +- src/util/virnetdevopenvswitch.h | 2 +- src/util/virnetdevtap.c | 6 +++--- src/util/virnetdevtap.h | 6 +++--- src/util/virnetdevvportprofile.c | 12 ++++++------ src/util/virnetdevvportprofile.h | 12 ++++++------ tests/bhyvexml2argvmock.c | 2 +- 24 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 76e036c48e..af8c0af7c7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29665,7 +29665,7 @@ virDomainNetGetActualHostdev(virDomainNetDefPtr ifa= ce) return NULL; } =20 -virNetDevVPortProfilePtr +const virNetDevVPortProfile * virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface) { switch (iface->type) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 44d5fb8e16..b08202b092 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3209,7 +3209,7 @@ int virDomainNetGetActualBridgeMACTableManager(virDom= ainNetDefPtr iface); const char *virDomainNetGetActualDirectDev(virDomainNetDefPtr iface); int virDomainNetGetActualDirectMode(virDomainNetDefPtr iface); virDomainHostdevDefPtr virDomainNetGetActualHostdev(virDomainNetDefPtr ifa= ce); -virNetDevVPortProfilePtr +const virNetDevVPortProfile * virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface); const virNetDevBandwidth * virDomainNetGetActualBandwidth(const virDomainNetDef *iface); diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_p= rofile_conf.c index 660478d128..1dd8439adb 100644 --- a/src/conf/netdev_vport_profile_conf.c +++ b/src/conf/netdev_vport_profile_conf.c @@ -197,7 +197,7 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned in= t flags) =20 =20 int -virNetDevVPortProfileFormat(virNetDevVPortProfilePtr virtPort, +virNetDevVPortProfileFormat(const virNetDevVPortProfile *virtPort, virBufferPtr buf) { enum virNetDevVPortProfile type; diff --git a/src/conf/netdev_vport_profile_conf.h b/src/conf/netdev_vport_p= rofile_conf.h index a2989af81e..6a99a42ee8 100644 --- a/src/conf/netdev_vport_profile_conf.h +++ b/src/conf/netdev_vport_profile_conf.h @@ -40,5 +40,5 @@ virNetDevVPortProfilePtr virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags); =20 int -virNetDevVPortProfileFormat(virNetDevVPortProfilePtr virtPort, +virNetDevVPortProfileFormat(const virNetDevVPortProfile *virtPort, virBufferPtr buf); diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index b0d67c7b83..113999b7b5 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1217,7 +1217,7 @@ libxlMakeNic(virDomainDefPtr def, virNetworkPtr network =3D NULL; virConnectPtr conn =3D NULL; const virNetDevBandwidth *actual_bw; - virNetDevVPortProfilePtr port_profile; + const virNetDevVPortProfile *port_profile; const virNetDevVlan *virt_vlan; virBuffer buf =3D VIR_BUFFER_INITIALIZER; size_t i; diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index 6e77921333..140a122fa1 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -1680,7 +1680,7 @@ xenFormatNet(virConnectPtr conn, switch (net->type) { case VIR_DOMAIN_NET_TYPE_BRIDGE: { - virNetDevVPortProfilePtr port_profile =3D virDomainNetGetActualVir= tPortProfile(net); + const virNetDevVPortProfile *port_profile =3D virDomainNetGetActua= lVirtPortProfile(net); const virNetDevVlan *virt_vlan =3D virDomainNetGetActualVlan(net); const char *script =3D net->script; size_t i; diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 34c70240cb..1a1239b1bd 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -4351,7 +4351,7 @@ lxcDomainDetachDeviceNetLive(virDomainObjPtr vm, int detachidx, ret =3D -1; virDomainNetType actualType; virDomainNetDefPtr detach =3D NULL; - virNetDevVPortProfilePtr vport =3D NULL; + const virNetDevVPortProfile *vport =3D NULL; virErrorPtr save_err =3D NULL; =20 if ((detachidx =3D virDomainNetFindIdx(vm->def, dev->data.net)) < 0) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 323f3632c0..1a565b6358 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -163,7 +163,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver, { size_t i; virLXCDomainObjPrivatePtr priv =3D vm->privateData; - virNetDevVPortProfilePtr vport =3D NULL; + const virNetDevVPortProfile *vport =3D NULL; virLXCDriverConfigPtr cfg =3D virLXCDriverGetConfig(driver); virConnectPtr conn =3D NULL; =20 @@ -284,7 +284,7 @@ virLXCProcessSetupInterfaceTap(virDomainDefPtr vm, char *ret =3D NULL; char *parentVeth; char *containerVeth =3D NULL; - virNetDevVPortProfilePtr vport =3D virDomainNetGetActualVirtPortProfil= e(net); + const virNetDevVPortProfile *vport =3D virDomainNetGetActualVirtPortPr= ofile(net); =20 VIR_DEBUG("calling vethCreate()"); parentVeth =3D net->ifname; @@ -339,7 +339,7 @@ char *virLXCProcessSetupInterfaceDirect(virConnectPtr c= onn, char *res_ifname =3D NULL; virLXCDriverPtr driver =3D conn->privateData; const virNetDevBandwidth *bw; - virNetDevVPortProfilePtr prof; + const virNetDevVPortProfile *prof; virLXCDriverConfigPtr cfg =3D virLXCDriverGetConfig(driver); const char *linkdev =3D virDomainNetGetActualDirectDev(net); unsigned int macvlan_create_flags =3D VIR_NETDEV_MACVLAN_CREATE_IFUP; @@ -645,7 +645,7 @@ static int virLXCProcessSetupInterfaces(virConnectPtr c= onn, virErrorPreserveLast(&save_err); for (i =3D 0; i < def->nnets; i++) { virDomainNetDefPtr iface =3D def->nets[i]; - virNetDevVPortProfilePtr vport =3D virDomainNetGetActualVirtPo= rtProfile(iface); + const virNetDevVPortProfile *vport =3D virDomainNetGetActualVi= rtPortProfile(iface); if (vport && vport->virtPortType =3D=3D VIR_NETDEV_VPORT_PROFI= LE_OPENVSWITCH) ignore_value(virNetDevOpenvswitchRemovePort( virDomainNetGetActualBridgeName(iface), diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b2e8759da7..0181b62602 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5420,7 +5420,7 @@ qemuDomainValidateActualNetDef(const virDomainNetDef = *net, * a element in the config) */ if (net->filter) { - virNetDevVPortProfilePtr vport =3D virDomainNetGetActualVirtPortPr= ofile(net); + const virNetDevVPortProfile *vport =3D virDomainNetGetActualVirtPo= rtProfile(net); =20 if (!(actualType =3D=3D VIR_DOMAIN_NET_TYPE_NETWORK || actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE || diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4cbe7b0060..8c5f516ab2 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1108,7 +1108,7 @@ qemuDomainAttachDeviceDiskLive(virQEMUDriverPtr drive= r, static void qemuDomainNetDeviceVportRemove(virDomainNetDefPtr net) { - virNetDevVPortProfilePtr vport =3D virDomainNetGetActualVirtPortProfil= e(net); + const virNetDevVPortProfile *vport =3D virDomainNetGetActualVirtPortPr= ofile(net); const char *brname; =20 if (!vport) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index f625c7086b..a3de9180ea 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -243,7 +243,7 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriverPtr driver= G_GNUC_UNUSED, =20 for (i =3D 0; i < def->nnets; i++) { virDomainNetDefPtr netptr; - virNetDevVPortProfilePtr vport; + const virNetDevVPortProfile *vport; =20 netptr =3D def->nets[i]; vport =3D virDomainNetGetActualVirtPortProfile(netptr); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7e0dc26658..a387341c8e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7384,7 +7384,7 @@ void qemuProcessStop(virQEMUDriverPtr driver, qemuDomainObjPrivatePtr priv =3D vm->privateData; virErrorPtr orig_err; virDomainDefPtr def; - virNetDevVPortProfilePtr vport =3D NULL; + const virNetDevVPortProfile *vport =3D NULL; size_t i; char *timestamp; virQEMUDriverConfigPtr cfg =3D virQEMUDriverGetConfig(driver); diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 223a78bd34..8922a01d4b 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -406,7 +406,7 @@ virHostdevIsVFIODevice(const virDomainHostdevDef *hostd= ev) =20 static int virHostdevNetConfigVirtPortProfile(const char *linkdev, int vf, - virNetDevVPortProfilePtr virtPort, + const virNetDevVPortProfile *virtPort, const virMacAddr *macaddr, const unsigned char *uuid, bool associate) @@ -502,7 +502,7 @@ virHostdevSetNetConfig(virDomainHostdevDefPtr hostdev, { g_autofree char *linkdev =3D NULL; const virNetDevVlan *vlan; - virNetDevVPortProfilePtr virtPort; + const virNetDevVPortProfile *virtPort; int vf =3D -1; bool port_profile_associate =3D true; =20 @@ -552,7 +552,7 @@ virHostdevRestoreNetConfig(virDomainHostdevDefPtr hostd= ev, g_autofree virMacAddrPtr MAC =3D NULL; g_autofree virMacAddrPtr adminMAC =3D NULL; g_autoptr(virNetDevVlan) vlan =3D NULL; - virNetDevVPortProfilePtr virtPort; + const virNetDevVPortProfile *virtPort; int vf =3D -1; bool port_profile_associate =3D false; =20 diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index c530cb75ed..e343dad923 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -828,7 +828,7 @@ virNetDevMacVLanVPortProfileRegisterCallback(const char= *ifname, const virMacAddr *macaddress, const char *linkdev, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virt= PortProfile, + const virNetDevVPortProfile *= virtPortProfile, virNetDevVPortProfileOp vmOp) { virNetlinkCallbackDataPtr calld =3D NULL; @@ -897,7 +897,7 @@ virNetDevMacVLanCreateWithVPortProfile(const char *ifna= meRequested, virNetDevMacVLanMode mode, const virNetDevVlan *vlan, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortPr= ofile, + const virNetDevVPortProfile *virtPo= rtProfile, char **ifnameResult, virNetDevVPortProfileOp vmOp, char *stateDir, @@ -1094,7 +1094,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char= *ifname, const virMacAddr *macaddr, const char *linkdev, int mode, - virNetDevVPortProfilePtr virtPo= rtProfile, + const virNetDevVPortProfile *vi= rtPortProfile, char *stateDir) { int ret =3D 0; @@ -1149,7 +1149,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const cha= r *cr_ifname, const virMacAddr *macaddress, const char *linkdev, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtP= ortProfile, + const virNetDevVPortProfile *v= irtPortProfile, virNetDevVPortProfileOp vmOp) { int rc =3D 0; @@ -1226,7 +1226,7 @@ int virNetDevMacVLanCreateWithVPortProfile(const char= *ifname G_GNUC_UNUSED, virNetDevMacVLanMode mode G_GNU= C_UNUSED, const virNetDevVlan *vlan G_GNU= C_UNUSED, const unsigned char *vmuuid G_G= NUC_UNUSED, - virNetDevVPortProfilePtr virtPo= rtProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *vi= rtPortProfile G_GNUC_UNUSED, char **res_ifname G_GNUC_UNUSED, virNetDevVPortProfileOp vmop G_= GNUC_UNUSED, char *stateDir G_GNUC_UNUSED, @@ -1243,7 +1243,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char= *ifname G_GNUC_UNUSED, const virMacAddr *macaddress G_= GNUC_UNUSED, const char *linkdev G_GNUC_UNUS= ED, int mode G_GNUC_UNUSED, - virNetDevVPortProfilePtr virtPo= rtProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *vi= rtPortProfile G_GNUC_UNUSED, char *stateDir G_GNUC_UNUSED) { virReportSystemError(ENOSYS, "%s", @@ -1255,7 +1255,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const cha= r *cr_ifname G_GNUC_UNUSED, const virMacAddr *macaddress G= _GNUC_UNUSED, const char *linkdev G_GNUC_UNU= SED, const unsigned char *vmuuid G_= GNUC_UNUSED, - virNetDevVPortProfilePtr virtP= ortProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *v= irtPortProfile G_GNUC_UNUSED, virNetDevVPortProfileOp vmOp G= _GNUC_UNUSED) { virReportSystemError(ENOSYS, "%s", @@ -1267,7 +1267,7 @@ int virNetDevMacVLanVPortProfileRegisterCallback(cons= t char *ifname G_GNUC_UNUSE const virMacAddr *macaddr= ess G_GNUC_UNUSED, const char *linkdev G_GNU= C_UNUSED, const unsigned char *vmuu= id G_GNUC_UNUSED, - virNetDevVPortProfilePtr = virtPortProfile G_GNUC_UNUSED, + const virNetDevVPortProfi= le *virtPortProfile G_GNUC_UNUSED, virNetDevVPortProfileOp v= mOp G_GNUC_UNUSED) { virReportSystemError(ENOSYS, "%s", diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h index f455ec3384..fc1bb018a2 100644 --- a/src/util/virnetdevmacvlan.h +++ b/src/util/virnetdevmacvlan.h @@ -78,7 +78,7 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *if= name, virNetDevMacVLanMode mode, const virNetDevVlan *vlan, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPo= rtProfile, + const virNetDevVPortProfile *vi= rtPortProfile, char **res_ifname, virNetDevVPortProfileOp vmop, char *stateDir, @@ -101,7 +101,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char *= ifname, const virMacAddr *macaddress, const char *linkdev, int mode, - virNetDevVPortProfilePtr virtPo= rtProfile, + const virNetDevVPortProfile *vi= rtPortProfile, char *stateDir) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6) G_GNUC_WARN_UNUSED_RESULT; @@ -110,7 +110,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const char = *cr_ifname, const virMacAddr *macaddress, const char *linkdev, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtP= ortProfile, + const virNetDevVPortProfile *v= irtPortProfile, virNetDevVPortProfileOp vmOp) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT; @@ -119,7 +119,7 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const = char *ifname, const virMacAddr *macaddr= ess, const char *linkdev, const unsigned char *vmuu= id, - virNetDevVPortProfilePtr = virtPortProfile, + const virNetDevVPortProfi= le *virtPortProfile, virNetDevVPortProfileOp v= mOp) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevmidonet.c b/src/util/virnetdevmidonet.c index e50cceaef5..354350ce1b 100644 --- a/src/util/virnetdevmidonet.c +++ b/src/util/virnetdevmidonet.c @@ -37,7 +37,7 @@ */ int virNetDevMidonetBindPort(const char *ifname, - virNetDevVPortProfilePtr virtualport) + const virNetDevVPortProfile *virtualport) { int ret =3D -1; virCommandPtr cmd =3D NULL; @@ -71,7 +71,7 @@ virNetDevMidonetBindPort(const char *ifname, * Returns 0 in case of success or -1 in case of failure. */ int -virNetDevMidonetUnbindPort(virNetDevVPortProfilePtr virtualport) +virNetDevMidonetUnbindPort(const virNetDevVPortProfile *virtualport) { int ret =3D -1; virCommandPtr cmd =3D NULL; diff --git a/src/util/virnetdevmidonet.h b/src/util/virnetdevmidonet.h index 61927c3edd..87ac3d74a1 100644 --- a/src/util/virnetdevmidonet.h +++ b/src/util/virnetdevmidonet.h @@ -23,8 +23,8 @@ =20 =20 int virNetDevMidonetBindPort(const char *ifname, - virNetDevVPortProfilePtr virtualport) + const virNetDevVPortProfile *virtualport) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; =20 -int virNetDevMidonetUnbindPort(virNetDevVPortProfilePtr virtualport) +int virNetDevMidonetUnbindPort(const virNetDevVPortProfile *virtualport) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index 9aa2c5ad84..81898057b1 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -135,7 +135,7 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, c= onst virNetDevVlan *virtV int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr ovsport, + const virNetDevVPortProfile *ovsport, const virNetDevVlan *virtVlan) { char macaddrstr[VIR_MAC_STRING_BUFLEN]; diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitc= h.h index dddb21a5a2..c9ea592058 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -32,7 +32,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr ovsport, + const virNetDevVPortProfile *ovsport, const virNetDevVlan *virtVlan) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index fa1626d6ba..d012c5e210 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -502,7 +502,7 @@ virNetDevTapAttachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -574,7 +574,7 @@ virNetDevTapReattachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -660,7 +660,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, const char *tunpath, int *tapfd, size_t tapfdSize, - virNetDevVPortProfilePtr virtPortProfil= e, + const virNetDevVPortProfile *virtPortPr= ofile, const virNetDevVlan *virtVlan, virNetDevCoalescePtr coalesce, unsigned int mtu, diff --git a/src/util/virnetdevtap.h b/src/util/virnetdevtap.h index 4fc734fd5e..cae8e61861 100644 --- a/src/util/virnetdevtap.h +++ b/src/util/virnetdevtap.h @@ -63,7 +63,7 @@ virNetDevTapAttachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -75,7 +75,7 @@ virNetDevTapReattachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -89,7 +89,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, const char *tunpath, int *tapfd, size_t tapfdSize, - virNetDevVPortProfilePtr virtPortProfil= e, + const virNetDevVPortProfile *virtPortPr= ofile, const virNetDevVlan *virtVlan, virNetDevCoalescePtr coalesce, unsigned int mtu, diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprof= ile.c index 6442c2a2cf..593bd6e2d6 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -85,7 +85,7 @@ enum virNetDevVPortProfileLinkOp { #endif =20 bool -virNetDevVPortProfileEqual(virNetDevVPortProfilePtr a, virNetDevVPortProfi= lePtr b) +virNetDevVPortProfileEqual(const virNetDevVPortProfile *a, const virNetDev= VPortProfile *b) { /* NULL resistant */ if (!a && !b) @@ -226,7 +226,7 @@ virNetDevVPortProfileCheckComplete(virNetDevVPortProfil= ePtr virtport, * an error is logged and -1 is returned. */ int -virNetDevVPortProfileCheckNoExtras(virNetDevVPortProfilePtr virtport) +virNetDevVPortProfileCheckNoExtras(const virNetDevVPortProfile *virtport) { const char *extra =3D NULL; =20 @@ -283,7 +283,7 @@ virNetDevVPortProfileCheckNoExtras(virNetDevVPortProfil= ePtr virtport) */ static int virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig, - virNetDevVPortProfilePtr mods) + const virNetDevVPortProfile *mods) { enum virNetDevVPortProfile otype; =20 @@ -423,9 +423,9 @@ virNetDevVPortProfileMerge(virNetDevVPortProfilePtr ori= g, */ =20 int virNetDevVPortProfileMerge3(virNetDevVPortProfilePtr *result, - virNetDevVPortProfilePtr fromInterface, - virNetDevVPortProfilePtr fromNetwork, - virNetDevVPortProfilePtr fromPortgroup) + const virNetDevVPortProfile *fromInterface, + const virNetDevVPortProfile *fromNetwork, + const virNetDevVPortProfile *fromPortgroup) { int ret =3D -1; *result =3D NULL; diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprof= ile.h index 5fdd019a09..88a42a1816 100644 --- a/src/util/virnetdevvportprofile.h +++ b/src/util/virnetdevvportprofile.h @@ -77,19 +77,19 @@ struct _virNetDevVPortProfile { }; =20 =20 -bool virNetDevVPortProfileEqual(virNetDevVPortProfilePtr a, - virNetDevVPortProfilePtr b); +bool virNetDevVPortProfileEqual(const virNetDevVPortProfile *a, + const virNetDevVPortProfile *b); int virNetDevVPortProfileCopy(virNetDevVPortProfilePtr *dst, const virNetDevVPortProfile *src); =20 int virNetDevVPortProfileCheckComplete(virNetDevVPortProfilePtr virtport, bool generateMissing); -int virNetDevVPortProfileCheckNoExtras(virNetDevVPortProfilePtr virtport); +int virNetDevVPortProfileCheckNoExtras(const virNetDevVPortProfile *virtpo= rt); =20 int virNetDevVPortProfileMerge3(virNetDevVPortProfilePtr *result, - virNetDevVPortProfilePtr fromInterface, - virNetDevVPortProfilePtr fromNetwork, - virNetDevVPortProfilePtr fromPortgroup); + const virNetDevVPortProfile *fromInterface, + const virNetDevVPortProfile *fromNetwork, + const virNetDevVPortProfile *fromPortgroup= ); =20 int virNetDevVPortProfileAssociate(const char *ifname, const virNetDevVPortProfile *virtPort, diff --git a/tests/bhyvexml2argvmock.c b/tests/bhyvexml2argvmock.c index ac4ffe8596..2a552f9f47 100644 --- a/tests/bhyvexml2argvmock.c +++ b/tests/bhyvexml2argvmock.c @@ -26,7 +26,7 @@ int virNetDevTapCreateInBridgePort(const char *brname G_G= NUC_UNUSED, const char *tunpath G_GNUC_UNUSED, int *tapfd G_GNUC_UNUSED, size_t tapfdSize G_GNUC_UNUSED, - virNetDevVPortProfilePtr virtPortProfil= e G_GNUC_UNUSED, + const virNetDevVPortProfile *virtPortPr= ofile G_GNUC_UNUSED, const virNetDevVlan *virtVlan G_GNUC_UN= USED, virNetDevCoalescePtr coalesce G_GNUC_UN= USED, unsigned int mtu G_GNUC_UNUSED, --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list