From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVRLO-0000fS-HF for qemu-devel@nongnu.org; Thu, 25 Apr 2013 14:56:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVRLJ-0006T8-O9 for qemu-devel@nongnu.org; Thu, 25 Apr 2013 14:56:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVRLJ-0006Sz-Fy for qemu-devel@nongnu.org; Thu, 25 Apr 2013 14:56:29 -0400 Message-ID: <51797C28.4070702@redhat.com> Date: Thu, 25 Apr 2013 12:55:36 -0600 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2IQPGOWQXCHJJLNONXROT" Subject: Re: [Qemu-devel] [PATCH v2 06/12] block: update error reporting for bdrv_snapshot_list() and related functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: kwolf@redhat.com, xiawenc@linux.vnet.ibm.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2IQPGOWQXCHJJLNONXROT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/24/2013 09:32 AM, Pavel Hrdina wrote: > Now the bdrv_snapshot_list function returns only number of snapshots. I= n case > that there is any error, the proper error message is set and return val= ue is 0. > The return value is no longer for testing for errors because there shou= ld 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. >=20 > Signed-off-by: Pavel Hrdina > --- > 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(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2IQPGOWQXCHJJLNONXROT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJReXwoAAoJEKeha0olJ0Nqa8cH/iFnWpzIsfdyImRoWuD0djsC JyDV+bdLaapU6JBm5iRHoRftOaAFH5y9TCtpKHGQfS3EZI+idsZbGzo5YjqMRaxv z7qQ5M5o3mfYS65JCIUAZrx9/2Ay5/jh616qKHWXTJlHzb+4Ow5XOrQScceUvUo/ 89Qw3O0IYY1dS0OPfe0SRaCX2goUVu5dAZ7UMGo2EGgKZxb0oFPUoOSYY1ZQLEem 4jtT9hIWAE1G0dL52ywLo3y+dsItPQCkctYV9la9Rn2bGlRkf5cz6OeiRjTU+hn+ WBCsecNbrD3upIgvfvHqLnmbJ8xRrhQIC8Z4PkZGoeO+0WNSIwkzZZ7kf86//ds= =q6yj -----END PGP SIGNATURE----- ------enig2IQPGOWQXCHJJLNONXROT--