virsh: Fix the typos

* tools/virsh-network.c: s/MATCH/VSH_MATCH/
This commit is contained in:
Osier Yang 2012-09-11 18:48:19 +08:00
parent 9cc4270112
commit 3dcafffe17

View File

@ -434,8 +434,8 @@ fallback:
vshResetLibvirtError(); vshResetLibvirtError();
/* Get the number of active networks */ /* Get the number of active networks */
if (!MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) || if (!VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) ||
MATCH(VIR_CONNECT_LIST_NETWORKS_ACTIVE)) { VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_ACTIVE)) {
if ((nActiveNets = virConnectNumOfNetworks(ctl->conn)) < 0) { if ((nActiveNets = virConnectNumOfNetworks(ctl->conn)) < 0) {
vshError(ctl, "%s", _("Failed to get the number of active networks")); vshError(ctl, "%s", _("Failed to get the number of active networks"));
goto cleanup; goto cleanup;
@ -443,8 +443,8 @@ fallback:
} }
/* Get the number of inactive networks */ /* Get the number of inactive networks */
if (!MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) || if (!VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) ||
MATCH(VIR_CONNECT_LIST_NETWORKS_INACTIVE)) { VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_INACTIVE)) {
if ((nInactiveNets = virConnectNumOfDefinedNetworks(ctl->conn)) < 0) { if ((nInactiveNets = virConnectNumOfDefinedNetworks(ctl->conn)) < 0) {
vshError(ctl, "%s", _("Failed to get the number of inactive networks")); vshError(ctl, "%s", _("Failed to get the number of inactive networks"));
goto cleanup; goto cleanup;
@ -459,8 +459,8 @@ fallback:
names = vshMalloc(ctl, sizeof(char *) * nAllNets); names = vshMalloc(ctl, sizeof(char *) * nAllNets);
/* Retrieve a list of active network names */ /* Retrieve a list of active network names */
if (!MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) || if (!VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) ||
MATCH(VIR_CONNECT_LIST_NETWORKS_ACTIVE)) { VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_ACTIVE)) {
if (virConnectListNetworks(ctl->conn, if (virConnectListNetworks(ctl->conn,
names, nActiveNets) < 0) { names, nActiveNets) < 0) {
vshError(ctl, "%s", _("Failed to list active networks")); vshError(ctl, "%s", _("Failed to list active networks"));
@ -469,8 +469,8 @@ fallback:
} }
/* Add the inactive networks to the end of the name list */ /* Add the inactive networks to the end of the name list */
if (!MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) || if (!VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) ||
MATCH(VIR_CONNECT_LIST_NETWORKS_ACTIVE)) { VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_ACTIVE)) {
if (virConnectListDefinedNetworks(ctl->conn, if (virConnectListDefinedNetworks(ctl->conn,
&names[nActiveNets], &names[nActiveNets],
nInactiveNets) < 0) { nInactiveNets) < 0) {
@ -505,26 +505,26 @@ filter:
net = list->nets[i]; net = list->nets[i];
/* persistence filter */ /* persistence filter */
if (MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT)) { if (VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT)) {
if ((persistent = virNetworkIsPersistent(net)) < 0) { if ((persistent = virNetworkIsPersistent(net)) < 0) {
vshError(ctl, "%s", _("Failed to get network persistence info")); vshError(ctl, "%s", _("Failed to get network persistence info"));
goto cleanup; goto cleanup;
} }
if (!((MATCH(VIR_CONNECT_LIST_NETWORKS_PERSISTENT) && persistent) || if (!((VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_PERSISTENT) && persistent) ||
(MATCH(VIR_CONNECT_LIST_NETWORKS_TRANSIENT) && !persistent))) (VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_TRANSIENT) && !persistent)))
goto remove_entry; goto remove_entry;
} }
/* autostart filter */ /* autostart filter */
if (MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART)) { if (VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART)) {
if (virNetworkGetAutostart(net, &autostart) < 0) { if (virNetworkGetAutostart(net, &autostart) < 0) {
vshError(ctl, "%s", _("Failed to get network autostart state")); vshError(ctl, "%s", _("Failed to get network autostart state"));
goto cleanup; goto cleanup;
} }
if (!((MATCH(VIR_CONNECT_LIST_NETWORKS_AUTOSTART) && autostart) || if (!((VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_AUTOSTART) && autostart) ||
(MATCH(VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART) && !autostart))) (VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART) && !autostart)))
goto remove_entry; goto remove_entry;
} }
/* the pool matched all filters, it may stay */ /* the pool matched all filters, it may stay */