From nobody Sun Feb 8 22:49:11 2026 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.zoho.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 1492041871916424.0669985660404; Wed, 12 Apr 2017 17:04:31 -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 836DAEEF02; Thu, 13 Apr 2017 00:04:30 +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 56E0A18989; Thu, 13 Apr 2017 00:04:30 +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 0A21A18523D1; Thu, 13 Apr 2017 00:04:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v3D04Oh0012183 for ; Wed, 12 Apr 2017 20:04:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 778E1173F3; Thu, 13 Apr 2017 00:04:24 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-15.phx2.redhat.com [10.3.116.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3025B17187 for ; Thu, 13 Apr 2017 00:04:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 836DAEEF02 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.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 836DAEEF02 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 12 Apr 2017 20:04:17 -0400 Message-Id: <20170413000418.30018-5-jferlan@redhat.com> In-Reply-To: <20170413000418.30018-1-jferlan@redhat.com> References: <20170413000418.30018-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH 4/5] conf: Rename virNetworkObjAssignDef to virNetworkObjUpdateAssignDef 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.38]); Thu, 13 Apr 2017 00:04:31 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rename the API to be a better description of what it does. Besides, a subsequent patch will rename virNetworkAssignDef to virNetworkObjAssignDef so rather than make that patch confusing we'll take the intermittent step in this patch. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 14 +++++++------- src/conf/virnetworkobj.h | 6 +++--- src/libvirt_private.syms | 2 +- src/network/bridge_driver.c | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index 216c7ae..55730e4 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -276,7 +276,7 @@ virNetworkObjListDispose(void *obj) =20 =20 /* - * virNetworkObjAssignDef: + * virNetworkObjUpdateAssignDef: * @network: the network object to update * @def: the new NetworkDef (will be consumed by this function) * @live: is this new def the "live" version, or the "persistent" version @@ -292,9 +292,9 @@ virNetworkObjListDispose(void *obj) * */ void -virNetworkObjAssignDef(virNetworkObjPtr network, - virNetworkDefPtr def, - bool live) +virNetworkObjUpdateAssignDef(virNetworkObjPtr network, + virNetworkDefPtr def, + bool live) { if (live) { /* before setting new live def, save (into newDef) any @@ -378,9 +378,9 @@ virNetworkAssignDefLocked(virNetworkObjListPtr nets, } } =20 - virNetworkObjAssignDef(network, - def, - !!(flags & VIR_NETWORK_OBJ_LIST_ADD_LIVE)); + virNetworkObjUpdateAssignDef(network, + def, + !!(flags & VIR_NETWORK_OBJ_LIST_ADD_L= IVE)); } else { /* UUID does not match, but if a name matches, refuse it */ if ((network =3D virNetworkObjFindByNameLocked(nets, def->name))) { diff --git a/src/conf/virnetworkobj.h b/src/conf/virnetworkobj.h index 431721b..0b6fbfe 100644 --- a/src/conf/virnetworkobj.h +++ b/src/conf/virnetworkobj.h @@ -95,9 +95,9 @@ virNetworkAssignDef(virNetworkObjListPtr nets, unsigned int flags); =20 void -virNetworkObjAssignDef(virNetworkObjPtr network, - virNetworkDefPtr def, - bool live); +virNetworkObjUpdateAssignDef(virNetworkObjPtr network, + virNetworkDefPtr def, + bool live); =20 int virNetworkObjSetDefTransient(virNetworkObjPtr network, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 3e2cb6b..6aaa3f9 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -925,7 +925,6 @@ virNetworkConfigChangeSetup; virNetworkDeleteConfig; virNetworkLoadAllConfigs; virNetworkLoadAllState; -virNetworkObjAssignDef; virNetworkObjEndAPI; virNetworkObjFindByName; virNetworkObjFindByNameLocked; @@ -944,6 +943,7 @@ virNetworkObjSetDefTransient; virNetworkObjTaint; virNetworkObjUnsetDefTransient; virNetworkObjUpdate; +virNetworkObjUpdateAssignDef; virNetworkRemoveInactive; virNetworkSaveStatus; =20 diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index f45c2a8..b30caf5 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3490,7 +3490,7 @@ static virNetworkPtr networkDefineXML(virConnectPtr c= onn, const char *xml) * definition by making it transient. * XXX - this isn't necessarily the correct thing to do. */ - virNetworkObjAssignDef(network, NULL, false); + virNetworkObjUpdateAssignDef(network, NULL, false); goto cleanup; } =20 @@ -3554,7 +3554,7 @@ networkUndefine(virNetworkPtr net) /* if the network still exists, it was active, and we need to make * it transient (by deleting the persistent def) */ - virNetworkObjAssignDef(network, NULL, false); + virNetworkObjUpdateAssignDef(network, NULL, false); } =20 ret =3D 0; --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list