mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
1d8721c480
commit
794080b486
@ -1284,8 +1284,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) &&
|
||||
@ -1345,7 +1345,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) {
|
||||
@ -1561,7 +1561,7 @@ virNetworkObjListPruneHelper(const void *payload,
|
||||
int want = 0;
|
||||
|
||||
virObjectLock(obj);
|
||||
want = virNetworkMatch(obj, data->flags);
|
||||
want = virNetworkObjMatch(obj, data->flags);
|
||||
virObjectUnlock(obj);
|
||||
return want;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -1910,8 +1910,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) &&
|
||||
@ -2005,7 +2005,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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user