]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virsh: Fix version numbers in comments
authorOsier Yang <jyang@redhat.com>
Thu, 13 Sep 2012 08:56:07 +0000 (16:56 +0800)
committerOsier Yang <jyang@redhat.com>
Thu, 13 Sep 2012 08:59:12 +0000 (16:59 +0800)
And redundant error resetting.

Pushed under trivial rule.

tools/virsh-network.c
tools/virsh-pool.c
tools/virsh-volume.c

index 5c3daa3d209256b46d0cbbb96558362b5bd7a5fc..2c32a7819f5311111c6f2635b1b395ef456b356f 100644 (file)
@@ -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 */
index 15d18830bd68223f4cddd48268d1e7280986b9fe..bc10f76ce0200f2cc5e45ad342be5ec4601458bf 100644 (file)
@@ -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 */
index ec0b5b055edef05935d5c8cea6e19ce703bfaf5e..c5bd4afd86ffbd44e214b61875dafe03a6dcf0a3 100644 (file)
@@ -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 */