aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-09-13 16:56:07 +0800
committerOsier Yang <jyang@redhat.com>2012-09-13 16:59:12 +0800
commitaa81db3ff883582493b0d03b29b39ff4bd78a68f (patch)
treee4f30dd55ab2fdf12c1aa015086a200b84fb9392 /tools
parentqemu: add usb-redir.filter qemu capability flag (diff)
downloadlibvirt-aa81db3ff883582493b0d03b29b39ff4bd78a68f.tar.gz
libvirt-aa81db3ff883582493b0d03b29b39ff4bd78a68f.tar.bz2
libvirt-aa81db3ff883582493b0d03b29b39ff4bd78a68f.zip
virsh: Fix version numbers in comments
And redundant error resetting. Pushed under trivial rule.
Diffstat (limited to 'tools')
-rw-r--r--tools/virsh-network.c8
-rw-r--r--tools/virsh-pool.c8
-rw-r--r--tools/virsh-volume.c8
3 files changed, 9 insertions, 15 deletions
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 5c3daa3d2..2c32a7819 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -397,7 +397,7 @@ vshNetworkListCollect(vshControl *ctl,
int nInactiveNets = 0;
int nAllNets = 0;
- /* try the list with flags support (0.10.0 and later) */
+ /* try the list with flags support (0.10.2 and later) */
if ((ret = virConnectListAllNetworks(ctl->conn,
&list->nets,
flags)) >= 0) {
@@ -406,10 +406,8 @@ vshNetworkListCollect(vshControl *ctl,
}
/* check if the command is actually supported */
- if (last_error && last_error->code == VIR_ERR_NO_SUPPORT) {
- vshResetLibvirtError();
+ if (last_error && last_error->code == VIR_ERR_NO_SUPPORT)
goto fallback;
- }
if (last_error && last_error->code == VIR_ERR_INVALID_ARG) {
/* try the new API again but mask non-guaranteed flags */
@@ -430,7 +428,7 @@ vshNetworkListCollect(vshControl *ctl,
fallback:
- /* fall back to old method (0.9.13 and older) */
+ /* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* Get the number of active networks */
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index 15d18830b..bc10f76ce 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -606,7 +606,7 @@ vshStoragePoolListCollect(vshControl *ctl,
int nInactivePools = 0;
int nAllPools = 0;
- /* try the list with flags support (0.10.0 and later) */
+ /* try the list with flags support (0.10.2 and later) */
if ((ret = virConnectListAllStoragePools(ctl->conn,
&list->pools,
flags)) >= 0) {
@@ -615,10 +615,8 @@ vshStoragePoolListCollect(vshControl *ctl,
}
/* check if the command is actually supported */
- if (last_error && last_error->code == VIR_ERR_NO_SUPPORT) {
- vshResetLibvirtError();
+ if (last_error && last_error->code == VIR_ERR_NO_SUPPORT)
goto fallback;
- }
if (last_error && last_error->code == VIR_ERR_INVALID_ARG) {
/* try the new API again but mask non-guaranteed flags */
@@ -638,7 +636,7 @@ vshStoragePoolListCollect(vshControl *ctl,
fallback:
- /* fall back to old method (0.9.13 and older) */
+ /* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* There is no way to get the pool type */
diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index ec0b5b055..c5bd4afd8 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -1017,7 +1017,7 @@ vshStorageVolListCollect(vshControl *ctl,
int nvols = 0;
int ret = -1;
- /* try the list with flags support (0.10.0 and later) */
+ /* try the list with flags support (0.10.2 and later) */
if ((ret = virStoragePoolListAllVolumes(pool,
&list->vols,
flags)) >= 0) {
@@ -1026,17 +1026,15 @@ vshStorageVolListCollect(vshControl *ctl,
}
/* check if the command is actually supported */
- if (last_error && last_error->code == VIR_ERR_NO_SUPPORT) {
- vshResetLibvirtError();
+ if (last_error && last_error->code == VIR_ERR_NO_SUPPORT)
goto fallback;
- }
/* there was an error during the call */
vshError(ctl, "%s", _("Failed to list volumes"));
goto cleanup;
fallback:
- /* fall back to old method (0.9.13 and older) */
+ /* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* Determine the number of volumes in the pool */