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

[libvirt] [PATCH v2 3/3] conf: rename Match functions



name match functions to be the vir prefix and interface name followed by ObjMatch

    ex. for virNetworkObjListExport, the match function is named
        virNetworkObjMatch

Signed-off-by: Anya Harter <aharter redhat com>
---
 src/conf/virnetworkobj.c    | 8 ++++----
 src/conf/virnodedeviceobj.c | 6 +++---
 src/conf/virsecretobj.c     | 6 +++---
 src/conf/virstorageobj.c    | 6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
index 69465d7f44..75a48601fa 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -1272,8 +1272,8 @@ virNetworkObjUpdate(virNetworkObjPtr obj,
 
 #define MATCH(FLAG) (flags & (FLAG))
 static bool
-virNetworkMatch(virNetworkObjPtr obj,
-                unsigned int flags)
+virNetworkObjMatch(virNetworkObjPtr obj,
+                   unsigned int flags)
 {
     /* filter by active state */
     if (MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) &&
@@ -1333,7 +1333,7 @@ virNetworkObjListExportCallback(void *payload,
         !data->filter(data->conn, obj->def))
         goto cleanup;
 
-    if (!virNetworkMatch(obj, data->flags))
+    if (!virNetworkObjMatch(obj, data->flags))
         goto cleanup;
 
     if (!data->nets) {
@@ -1549,7 +1549,7 @@ virNetworkObjListPruneHelper(const void *payload,
     int want = 0;
 
     virObjectLock(obj);
-    want = virNetworkMatch(obj, data->flags);
+    want = virNetworkObjMatch(obj, data->flags);
     virObjectUnlock(obj);
     return want;
 }
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index 2c660a080a..c8ad1314b5 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -804,8 +804,8 @@ virNodeDeviceObjListGetNames(virNodeDeviceObjListPtr devs,
 #define MATCH(FLAG) ((flags & (VIR_CONNECT_LIST_NODE_DEVICES_CAP_ ## FLAG)) && \
                      virNodeDeviceObjHasCap(obj, VIR_NODE_DEV_CAP_ ## FLAG))
 static bool
-virNodeDeviceMatch(virNodeDeviceObjPtr obj,
-                   unsigned int flags)
+virNodeDeviceObjMatch(virNodeDeviceObjPtr obj,
+                      unsigned int flags)
 {
     /* Refresh the capabilities first, e.g. due to a driver change */
     if (!obj->skipUpdateCaps &&
@@ -866,7 +866,7 @@ virNodeDeviceObjListExportCallback(void *payload,
     def = obj->def;
 
     if ((!data->filter || data->filter(data->conn, def)) &&
-        virNodeDeviceMatch(obj, data->flags)) {
+        virNodeDeviceObjMatch(obj, data->flags)) {
         if (data->devices) {
             if (!(device = virGetNodeDevice(data->conn, def->name)) ||
                 VIR_STRDUP(device->parentName, def->parent) < 0) {
diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c
index c80cf364c6..2ff2998c15 100644
--- a/src/conf/virsecretobj.c
+++ b/src/conf/virsecretobj.c
@@ -500,8 +500,8 @@ virSecretObjListNumOfSecrets(virSecretObjListPtr secrets,
 
 #define MATCH(FLAG) (flags & (FLAG))
 static bool
-virSecretObjMatchFlags(virSecretObjPtr obj,
-                       unsigned int flags)
+virSecretObjMatch(virSecretObjPtr obj,
+                  unsigned int flags)
 {
     virSecretDefPtr def = obj->def;
 
@@ -556,7 +556,7 @@ virSecretObjListExportCallback(void *payload,
     if (data->filter && !data->filter(data->conn, def))
         goto cleanup;
 
-    if (!virSecretObjMatchFlags(obj, data->flags))
+    if (!virSecretObjMatch(obj, data->flags))
         goto cleanup;
 
     if (!data->secrets) {
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 02ed491b6f..b44ce99dd5 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -1908,8 +1908,8 @@ virStoragePoolObjSourceFindDuplicate(virConnectPtr conn,
 
 #define MATCH(FLAG) (flags & (FLAG))
 static bool
-virStoragePoolMatch(virStoragePoolObjPtr obj,
-                    unsigned int flags)
+virStoragePoolObjMatch(virStoragePoolObjPtr obj,
+                       unsigned int flags)
 {
     /* filter by active state */
     if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) &&
@@ -2003,7 +2003,7 @@ virStoragePoolObjListExportCallback(void *payload,
     if (data->filter && !data->filter(data->conn, obj->def))
         goto cleanup;
 
-    if (!virStoragePoolMatch(obj, data->flags))
+    if (!virStoragePoolObjMatch(obj, data->flags))
         goto cleanup;
 
     if (data->pools) {
-- 
2.17.1


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