提交 794080b4 编写于 作者: A Anya Harter 提交者: Andrea Bolognani

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: NAnya Harter <aharter@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 1d8721c4
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册