[PATCH 1/4] nodedev: Alter @aclfilter to just @filter

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

 



Rename the variable, recent review requested just use of @filter,
so be consistent throughout.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/virnodedeviceobj.c | 28 ++++++++++++++--------------
 src/conf/virnodedeviceobj.h |  6 +++---
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index 3ab93a3..b0dcee1 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -732,7 +732,7 @@ virNodeDeviceCapMatch(virNodeDeviceObjPtr obj,
 
 struct virNodeDeviceCountData {
     virConnectPtr conn;
-    virNodeDeviceObjListFilter aclfilter;
+    virNodeDeviceObjListFilter filter;
     const char *matchstr;
     int count;
 };
@@ -745,11 +745,11 @@ virNodeDeviceObjListNumOfDevicesCallback(void *payload,
     virNodeDeviceObjPtr obj = payload;
     virNodeDeviceDefPtr def;
     struct virNodeDeviceCountData *data = opaque;
-    virNodeDeviceObjListFilter aclfilter = data->aclfilter;
+    virNodeDeviceObjListFilter filter = data->filter;
 
     virObjectLock(obj);
     def = obj->def;
-    if ((!aclfilter || aclfilter(data->conn, def)) &&
+    if ((!filter || filter(data->conn, def)) &&
         (!data->matchstr || virNodeDeviceObjHasCap(obj, data->matchstr)))
         data->count++;
 
@@ -762,10 +762,10 @@ int
 virNodeDeviceObjListNumOfDevices(virNodeDeviceObjListPtr devs,
                                  virConnectPtr conn,
                                  const char *cap,
-                                 virNodeDeviceObjListFilter aclfilter)
+                                 virNodeDeviceObjListFilter filter)
 {
     struct virNodeDeviceCountData data = {
-        .conn = conn, .aclfilter = aclfilter, .matchstr = cap, .count = 0 };
+        .conn = conn, .filter = filter, .matchstr = cap, .count = 0 };
 
     virObjectLock(devs);
     virHashForEach(devs->objs, virNodeDeviceObjListNumOfDevicesCallback, &data);
@@ -777,7 +777,7 @@ virNodeDeviceObjListNumOfDevices(virNodeDeviceObjListPtr devs,
 
 struct virNodeDeviceGetNamesData {
     virConnectPtr conn;
-    virNodeDeviceObjListFilter aclfilter;
+    virNodeDeviceObjListFilter filter;
     const char *matchstr;
     int nnames;
     char **names;
@@ -793,7 +793,7 @@ virNodeDeviceObjListGetNamesCallback(void *payload,
     virNodeDeviceObjPtr obj = payload;
     virNodeDeviceDefPtr def;
     struct virNodeDeviceGetNamesData *data = opaque;
-    virNodeDeviceObjListFilter aclfilter = data->aclfilter;
+    virNodeDeviceObjListFilter filter = data->filter;
 
     if (data->error)
         return 0;
@@ -801,7 +801,7 @@ virNodeDeviceObjListGetNamesCallback(void *payload,
     virObjectLock(obj);
     def = obj->def;
 
-    if ((!aclfilter || aclfilter(data->conn, def)) &&
+    if ((!filter || filter(data->conn, def)) &&
         (!data->matchstr || virNodeDeviceObjHasCap(obj, data->matchstr))) {
         if (VIR_STRDUP(data->names[data->nnames], def->name) < 0) {
             data->error = true;
@@ -819,13 +819,13 @@ virNodeDeviceObjListGetNamesCallback(void *payload,
 int
 virNodeDeviceObjListGetNames(virNodeDeviceObjListPtr devs,
                              virConnectPtr conn,
-                             virNodeDeviceObjListFilter aclfilter,
+                             virNodeDeviceObjListFilter filter,
                              const char *cap,
                              char **const names,
                              int maxnames)
 {
     struct virNodeDeviceGetNamesData data = {
-        .conn = conn, .aclfilter = aclfilter, .matchstr = cap, .names = names,
+        .conn = conn, .filter = filter, .matchstr = cap, .names = names,
         .nnames = 0, .maxnames = maxnames, .error = false };
 
     virObjectLock(devs);
@@ -878,7 +878,7 @@ virNodeDeviceMatch(virNodeDeviceObjPtr obj,
 
 struct virNodeDeviceObjListExportData {
     virConnectPtr conn;
-    virNodeDeviceObjListFilter aclfilter;
+    virNodeDeviceObjListFilter filter;
     unsigned int flags;
     virNodeDevicePtr *devices;
     int ndevices;
@@ -901,7 +901,7 @@ virNodeDeviceObjListExportCallback(void *payload,
     virObjectLock(obj);
     def = obj->def;
 
-    if ((!data->aclfilter || data->aclfilter(data->conn, def)) &&
+    if ((!data->filter || data->filter(data->conn, def)) &&
         virNodeDeviceMatch(obj, data->flags)) {
         if (data->devices) {
             if (!(device = virGetNodeDevice(data->conn, def->name)) ||
@@ -925,11 +925,11 @@ int
 virNodeDeviceObjListExport(virConnectPtr conn,
                            virNodeDeviceObjListPtr devs,
                            virNodeDevicePtr **devices,
-                           virNodeDeviceObjListFilter aclfilter,
+                           virNodeDeviceObjListFilter filter,
                            unsigned int flags)
 {
     struct virNodeDeviceObjListExportData data = {
-        .conn = conn, .aclfilter = aclfilter, .flags = flags,
+        .conn = conn, .filter = filter, .flags = flags,
         .devices = NULL, .ndevices = 0, .error = false };
 
     virObjectLock(devs);
diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h
index 06f2e9e..63917eb 100644
--- a/src/conf/virnodedeviceobj.h
+++ b/src/conf/virnodedeviceobj.h
@@ -91,12 +91,12 @@ int
 virNodeDeviceObjListNumOfDevices(virNodeDeviceObjListPtr devs,
                                  virConnectPtr conn,
                                  const char *cap,
-                                 virNodeDeviceObjListFilter aclfilter);
+                                 virNodeDeviceObjListFilter filter);
 
 int
 virNodeDeviceObjListGetNames(virNodeDeviceObjListPtr devs,
                              virConnectPtr conn,
-                             virNodeDeviceObjListFilter aclfilter,
+                             virNodeDeviceObjListFilter filter,
                              const char *cap,
                              char **const names,
                              int maxnames);
@@ -105,7 +105,7 @@ int
 virNodeDeviceObjListExport(virConnectPtr conn,
                            virNodeDeviceObjListPtr devobjs,
                            virNodeDevicePtr **devices,
-                           virNodeDeviceObjListFilter aclfilter,
+                           virNodeDeviceObjListFilter filter,
                            unsigned int flags);
 
 #endif /* __VIRNODEDEVICEOBJ_H__ */
-- 
2.9.4

--
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]
  Powered by Linux