virsh was not checking for a error code when listing storage
volumes. So when listing volumes in a pool that was shutoff,
no output was displayed
* tools/virsh.c: Fix error handling when listing volumes
/* Determine the number of volumes in the pool */
numVolumes = virStoragePoolNumOfVolumes(pool);
+ if (numVolumes < 0) {
+ vshError(ctl, "%s", _("Failed to list storage volumes"));
+ virStoragePoolFree(pool);
+ return FALSE;
+ }
+
/* Retrieve the list of volume names in the pool */
if (numVolumes > 0) {
activeNames = vshCalloc(ctl, numVolumes, sizeof(*activeNames));