On 04/24/2013 09:32 AM, Pavel Hrdina wrote:
> Now the bdrv_snapshot_list function returns only number of snapshots. In case
> that there is any error, the proper error message is set and return value is 
> 0.
> The return value is no longer for testing for errors because there should be 
> only
> one error reporting.

Either a caller is just getting the list and doesn't care about errors
(pass in NULL, 0 return is fine), or the caller wants to distinguish
between errors and an empty list (pass in error object; check it before
relying on the return value).  Seems usable.

> 
> Signed-off-by: Pavel Hrdina <phrd...@redhat.com>
> ---
>  block.c                   | 22 ++++++++++++++--------
>  block/qcow2-snapshot.c    |  4 +++-
>  block/qcow2.h             |  4 +++-
>  block/rbd.c               | 10 ++++++++--
>  block/sheepdog.c          | 20 +++++++++++---------
>  include/block/block.h     |  3 ++-
>  include/block/block_int.h |  3 ++-
>  qemu-img.c                | 11 ++++++++---
>  savevm.c                  | 15 +++++++++------
>  9 files changed, 60 insertions(+), 32 deletions(-)
> 

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to