On 11/12/2010 09:22 AM, Daniel P. Berrange wrote: > 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 > --- > tools/virsh.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/tools/virsh.c b/tools/virsh.c > index a840758..49dcd6e 100644 > --- a/tools/virsh.c > +++ b/tools/virsh.c > @@ -6738,6 +6738,12 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED) > /* 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; > + } > + ACK, and not dependent on the rest of the series, if you want to rebase this and push this early. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list