From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKY4j-0007HT-QT for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:26:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKY4e-0008CR-Of for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:26:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKY4e-0008CM-El for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:26:32 -0400 Message-ID: <523358D0.5020202@redhat.com> Date: Fri, 13 Sep 2013 12:26:24 -0600 From: Eric Blake MIME-Version: 1.0 References: <1379067909-22984-1-git-send-email-pl@kamp.de> <1379067909-22984-10-git-send-email-pl@kamp.de> In-Reply-To: <1379067909-22984-10-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i947UpqvlH0WUJv46fcTSO34eUXHrAbpE" Subject: Re: [Qemu-devel] [PATCH 09/12] block/get_block_status: set *pnum = 0 on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, stefanha@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i947UpqvlH0WUJv46fcTSO34eUXHrAbpE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/13/2013 04:25 AM, Peter Lieven wrote: > if the call is invoked through bdrv_is_allocated the caller might > expect *pnum =3D 0 on error. however, a new implementation of > bdrv_get_block_status might only return a negative exit value on > error while keeping *pnum untouched. >=20 > Signed-off-by: Peter Lieven > --- > block.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake >=20 > diff --git a/block.c b/block.c > index 76a6621..4922fb9 100644 > --- a/block.c > +++ b/block.c > @@ -3149,6 +3149,7 @@ static int64_t coroutine_fn bdrv_co_get_block_sta= tus(BlockDriverState *bs, > =20 > ret =3D bs->drv->bdrv_co_get_block_status(bs, sector_num, nb_secto= rs, pnum); > if (ret < 0) { > + *pnum =3D 0; > return ret; > } > =20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --i947UpqvlH0WUJv46fcTSO34eUXHrAbpE 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.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSM1jQAAoJEKeha0olJ0NqVEQH/2jeqaGFY7KklHvXiYyGfmDl l3PTtIxYjhpUR55JI8XQ579AoPVVaeYtnwhhrzXvUNV1/laSi2i2c65tD8/XI/yR Rf5tFoE3t7l3PojFUUgRPRpzEMeVRDd17NB2W8rmzzBo3P/yFNFvKVwpr4yngkGO 8+aBPb/NXAjEfz04/kd4qZE4N0pRZJ6UoCPnaNxRCGiHNQmjk94R6V1fovJs++bm GfIZPTcGFPzb82RXjzi7yJ12un78m+W9ulYGvsarJSNGpSU9oVFSz4ar//evM026 d2V+fkiaQdq2OCAXkGD2vGDYAqfXYm9loh3rE9vm+3Sbx2kfLeLF0XkfLeDkopE= =A5ZQ -----END PGP SIGNATURE----- --i947UpqvlH0WUJv46fcTSO34eUXHrAbpE--