qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 06/12] block: update error reporting for bdrv


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 06/12] block: update error reporting for bdrv_snapshot_list() and related functions
Date: Thu, 25 Apr 2013 12:55:36 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

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 <address@hidden>
> ---
>  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 <address@hidden>

-- 
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

[Prev in Thread] Current Thread [Next in Thread]