[PATCH v1 11/31] conf: s/virNetworkFindByUUID/virNetworkObjFindByUUID/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's returning virNetworkObjPtr after all. And it matches the
pattern laid out by domain_conf.h.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/conf/network_conf.c           |  6 +++---
 src/conf/network_conf.h           |  4 ++--
 src/libvirt_private.syms          |  2 +-
 src/network/bridge_driver.c       | 14 +++++++-------
 src/parallels/parallels_network.c | 10 +++++-----
 src/test/test_driver.c            |  8 ++++----
 6 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 00be8b6..30fb309 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -86,8 +86,8 @@ virNetworkObjTaint(virNetworkObjPtr obj,
     return true;
 }
 
-virNetworkObjPtr virNetworkFindByUUID(virNetworkObjListPtr nets,
-                                      const unsigned char *uuid)
+virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets,
+                                         const unsigned char *uuid)
 {
     size_t i;
 
@@ -4150,7 +4150,7 @@ virNetworkObjIsDuplicate(virNetworkObjListPtr nets,
     virNetworkObjPtr net = NULL;
 
     /* See if a network with matching UUID already exists */
-    net = virNetworkFindByUUID(nets, def->uuid);
+    net = virNetworkObjFindByUUID(nets, def->uuid);
     if (net) {
         /* UUID matches, but if names don't match, refuse it */
         if (STRNEQ(net->def->name, def->name)) {
diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index 74665e0..3298376 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -301,8 +301,8 @@ virNetworkObjIsActive(const virNetworkObj *net)
 bool virNetworkObjTaint(virNetworkObjPtr obj,
                         virNetworkTaintFlags taint);
 
-virNetworkObjPtr virNetworkFindByUUID(virNetworkObjListPtr nets,
-                                      const unsigned char *uuid);
+virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets,
+                                         const unsigned char *uuid);
 virNetworkObjPtr virNetworkFindByName(virNetworkObjListPtr nets,
                                       const char *name);
 
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ba05cc6..140f3f4 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -559,13 +559,13 @@ virNetworkDefParseString;
 virNetworkDefUpdateSection;
 virNetworkDeleteConfig;
 virNetworkFindByName;
-virNetworkFindByUUID;
 virNetworkForwardTypeToString;
 virNetworkIpDefNetmask;
 virNetworkIpDefPrefix;
 virNetworkLoadAllConfigs;
 virNetworkLoadAllState;
 virNetworkObjAssignDef;
+virNetworkObjFindByUUID;
 virNetworkObjFree;
 virNetworkObjGetPersistentDef;
 virNetworkObjIsDuplicate;
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 1011984..f67822a 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -130,7 +130,7 @@ networkObjFromNetwork(virNetworkPtr net)
     char uuidstr[VIR_UUID_STRING_BUFLEN];
 
     networkDriverLock();
-    network = virNetworkFindByUUID(driver->networks, net->uuid);
+    network = virNetworkObjFindByUUID(driver->networks, net->uuid);
     networkDriverUnlock();
 
     if (!network) {
@@ -2476,7 +2476,7 @@ static virNetworkPtr networkLookupByUUID(virConnectPtr conn,
     virNetworkPtr ret = NULL;
 
     networkDriverLock();
-    network = virNetworkFindByUUID(driver->networks, uuid);
+    network = virNetworkObjFindByUUID(driver->networks, uuid);
     networkDriverUnlock();
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
@@ -3069,7 +3069,7 @@ networkUndefine(virNetworkPtr net)
 
     networkDriverLock();
 
-    network = virNetworkFindByUUID(driver->networks, net->uuid);
+    network = virNetworkObjFindByUUID(driver->networks, net->uuid);
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
                        "%s", _("no network with matching uuid"));
@@ -3142,7 +3142,7 @@ networkUpdate(virNetworkPtr net,
 
     networkDriverLock();
 
-    network = virNetworkFindByUUID(driver->networks, net->uuid);
+    network = virNetworkObjFindByUUID(driver->networks, net->uuid);
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
                        "%s", _("no network with matching uuid"));
@@ -3299,7 +3299,7 @@ static int networkCreate(virNetworkPtr net)
     virObjectEventPtr event = NULL;
 
     networkDriverLock();
-    network = virNetworkFindByUUID(driver->networks, net->uuid);
+    network = virNetworkObjFindByUUID(driver->networks, net->uuid);
 
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
@@ -3334,7 +3334,7 @@ static int networkDestroy(virNetworkPtr net)
     virObjectEventPtr event = NULL;
 
     networkDriverLock();
-    network = virNetworkFindByUUID(driver->networks, net->uuid);
+    network = virNetworkObjFindByUUID(driver->networks, net->uuid);
 
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
@@ -3460,7 +3460,7 @@ static int networkSetAutostart(virNetworkPtr net,
     int ret = -1;
 
     networkDriverLock();
-    network = virNetworkFindByUUID(driver->networks, net->uuid);
+    network = virNetworkObjFindByUUID(driver->networks, net->uuid);
 
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
diff --git a/src/parallels/parallels_network.c b/src/parallels/parallels_network.c
index bfa7432..23eee89 100644
--- a/src/parallels/parallels_network.c
+++ b/src/parallels/parallels_network.c
@@ -463,7 +463,7 @@ static virNetworkPtr parallelsNetworkLookupByUUID(virConnectPtr conn,
     virNetworkPtr ret = NULL;
 
     parallelsDriverLock(privconn);
-    network = virNetworkFindByUUID(privconn->networks, uuid);
+    network = virNetworkObjFindByUUID(privconn->networks, uuid);
     parallelsDriverUnlock(privconn);
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
@@ -513,7 +513,7 @@ static char *parallelsNetworkGetXMLDesc(virNetworkPtr net,
     virCheckFlags(VIR_NETWORK_XML_INACTIVE, NULL);
 
     parallelsDriverLock(privconn);
-    network = virNetworkFindByUUID(privconn->networks, net->uuid);
+    network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
     parallelsDriverUnlock(privconn);
 
     if (!network) {
@@ -537,7 +537,7 @@ static int parallelsNetworkIsActive(virNetworkPtr net)
     int ret = -1;
 
     parallelsDriverLock(privconn);
-    obj = virNetworkFindByUUID(privconn->networks, net->uuid);
+    obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
     parallelsDriverUnlock(privconn);
     if (!obj) {
         virReportError(VIR_ERR_NO_NETWORK, NULL);
@@ -558,7 +558,7 @@ static int parallelsNetworkIsPersistent(virNetworkPtr net)
     int ret = -1;
 
     parallelsDriverLock(privconn);
-    obj = virNetworkFindByUUID(privconn->networks, net->uuid);
+    obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
     parallelsDriverUnlock(privconn);
     if (!obj) {
         virReportError(VIR_ERR_NO_NETWORK, NULL);
@@ -580,7 +580,7 @@ static int parallelsNetworkGetAutostart(virNetworkPtr net,
     int ret = -1;
 
     parallelsDriverLock(privconn);
-    network = virNetworkFindByUUID(privconn->networks, net->uuid);
+    network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
     parallelsDriverUnlock(privconn);
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 90df0e7..a747704 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3499,7 +3499,7 @@ static virNetworkPtr testNetworkLookupByUUID(virConnectPtr conn,
     virNetworkPtr ret = NULL;
 
     testDriverLock(privconn);
-    net = virNetworkFindByUUID(privconn->networks, uuid);
+    net = virNetworkObjFindByUUID(privconn->networks, uuid);
     testDriverUnlock(privconn);
 
     if (net == NULL) {
@@ -3654,7 +3654,7 @@ static int testNetworkIsActive(virNetworkPtr net)
     int ret = -1;
 
     testDriverLock(privconn);
-    obj = virNetworkFindByUUID(privconn->networks, net->uuid);
+    obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
     testDriverUnlock(privconn);
     if (!obj) {
         virReportError(VIR_ERR_NO_NETWORK, NULL);
@@ -3675,7 +3675,7 @@ static int testNetworkIsPersistent(virNetworkPtr net)
     int ret = -1;
 
     testDriverLock(privconn);
-    obj = virNetworkFindByUUID(privconn->networks, net->uuid);
+    obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
     testDriverUnlock(privconn);
     if (!obj) {
         virReportError(VIR_ERR_NO_NETWORK, NULL);
@@ -3812,7 +3812,7 @@ testNetworkUpdate(virNetworkPtr net,
 
     testDriverLock(privconn);
 
-    network = virNetworkFindByUUID(privconn->networks, net->uuid);
+    network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
                        "%s", _("no network with matching uuid"));
-- 
2.0.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]