mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
list: fix typo in virsh patch
A last minute rename in commitfc122e1a
to virsh.h was not properly reflected when rebasing virsh-pool.c in commit93a346d
. * tools/virsh-pool.c (vshStoragePoolListCollect): Use VSH_MATCH, not MATCH.
This commit is contained in:
parent
f299ddd6b1
commit
9a6e57517b
@ -642,15 +642,15 @@ fallback:
|
|||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
/* There is no way to get the pool type */
|
/* There is no way to get the pool type */
|
||||||
if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE)) {
|
if (VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE)) {
|
||||||
vshError(ctl, "%s", _("Filtering using --type is not supported "
|
vshError(ctl, "%s", _("Filtering using --type is not supported "
|
||||||
"by this libvirt"));
|
"by this libvirt"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the number of active pools */
|
/* Get the number of active pools */
|
||||||
if (!MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
if (!VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
||||||
MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE)) {
|
VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE)) {
|
||||||
if ((nActivePools = virConnectNumOfStoragePools(ctl->conn)) < 0) {
|
if ((nActivePools = virConnectNumOfStoragePools(ctl->conn)) < 0) {
|
||||||
vshError(ctl, "%s", _("Failed to get the number of active pools "));
|
vshError(ctl, "%s", _("Failed to get the number of active pools "));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -658,8 +658,8 @@ fallback:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the number of inactive pools */
|
/* Get the number of inactive pools */
|
||||||
if (!MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
if (!VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
||||||
MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE)) {
|
VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE)) {
|
||||||
if ((nInactivePools = virConnectNumOfDefinedStoragePools(ctl->conn)) < 0) {
|
if ((nInactivePools = virConnectNumOfDefinedStoragePools(ctl->conn)) < 0) {
|
||||||
vshError(ctl, "%s", _("Failed to get the number of inactive pools"));
|
vshError(ctl, "%s", _("Failed to get the number of inactive pools"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -674,8 +674,8 @@ fallback:
|
|||||||
names = vshMalloc(ctl, sizeof(char *) * nAllPools);
|
names = vshMalloc(ctl, sizeof(char *) * nAllPools);
|
||||||
|
|
||||||
/* Retrieve a list of active storage pool names */
|
/* Retrieve a list of active storage pool names */
|
||||||
if (!MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
if (!VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
||||||
MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE)) {
|
VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE)) {
|
||||||
if (virConnectListStoragePools(ctl->conn,
|
if (virConnectListStoragePools(ctl->conn,
|
||||||
names, nActivePools) < 0) {
|
names, nActivePools) < 0) {
|
||||||
vshError(ctl, "%s", _("Failed to list active pools"));
|
vshError(ctl, "%s", _("Failed to list active pools"));
|
||||||
@ -684,8 +684,8 @@ fallback:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Add the inactive storage pools to the end of the name list */
|
/* Add the inactive storage pools to the end of the name list */
|
||||||
if (!MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
if (!VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
|
||||||
MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE)) {
|
VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE)) {
|
||||||
if (virConnectListDefinedStoragePools(ctl->conn,
|
if (virConnectListDefinedStoragePools(ctl->conn,
|
||||||
&names[nActivePools],
|
&names[nActivePools],
|
||||||
nInactivePools) < 0) {
|
nInactivePools) < 0) {
|
||||||
@ -720,26 +720,26 @@ filter:
|
|||||||
pool = list->pools[i];
|
pool = list->pools[i];
|
||||||
|
|
||||||
/* persistence filter */
|
/* persistence filter */
|
||||||
if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT)) {
|
if (VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT)) {
|
||||||
if ((persistent = virStoragePoolIsPersistent(pool)) < 0) {
|
if ((persistent = virStoragePoolIsPersistent(pool)) < 0) {
|
||||||
vshError(ctl, "%s", _("Failed to get pool persistence info"));
|
vshError(ctl, "%s", _("Failed to get pool persistence info"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!((MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT) && persistent) ||
|
if (!((VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT) && persistent) ||
|
||||||
(MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT) && !persistent)))
|
(VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT) && !persistent)))
|
||||||
goto remove_entry;
|
goto remove_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* autostart filter */
|
/* autostart filter */
|
||||||
if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART)) {
|
if (VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART)) {
|
||||||
if (virStoragePoolGetAutostart(pool, &autostart) < 0) {
|
if (virStoragePoolGetAutostart(pool, &autostart) < 0) {
|
||||||
vshError(ctl, "%s", _("Failed to get pool autostart state"));
|
vshError(ctl, "%s", _("Failed to get pool autostart state"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!((MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART) && autostart) ||
|
if (!((VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART) && autostart) ||
|
||||||
(MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART) && !autostart)))
|
(VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART) && !autostart)))
|
||||||
goto remove_entry;
|
goto remove_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user