From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI8Xg-0001Va-6k for qemu-devel@nongnu.org; Tue, 19 Mar 2013 22:14:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI8Xb-00049s-GS for qemu-devel@nongnu.org; Tue, 19 Mar 2013 22:14:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI8Xb-00049n-7o for qemu-devel@nongnu.org; Tue, 19 Mar 2013 22:14:11 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2K2EAZg018218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 19 Mar 2013 22:14:10 -0400 Message-ID: <51491B70.7000302@redhat.com> Date: Tue, 19 Mar 2013 20:14:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363627441-8297-1-git-send-email-kwolf@redhat.com> <1363627441-8297-10-git-send-email-kwolf@redhat.com> In-Reply-To: <1363627441-8297-10-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2NHRWUKJPLBHITHKOTLOB" Subject: Re: [Qemu-devel] [PATCH 09/11] block: Make find_image_format safe with NULL filename List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pbonzini@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2NHRWUKJPLBHITHKOTLOB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/18/2013 11:23 AM, Kevin Wolf wrote: > In order to achieve this, the .bdrv_probe callbacks of all drivers must= > cope with this. The DMG driver is the only one that bases its decision > on the filename and it needs to be changed. >=20 > Signed-off-by: Kevin Wolf > --- > block/dmg.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake >=20 > diff --git a/block/dmg.c b/block/dmg.c > index c1066df..3141cb5 100644 > --- a/block/dmg.c > +++ b/block/dmg.c > @@ -51,9 +51,16 @@ typedef struct BDRVDMGState { > =20 > static int dmg_probe(const uint8_t *buf, int buf_size, const char *fil= ename) > { > - int len=3Dstrlen(filename); > - if(len>4 && !strcmp(filename+len-4,".dmg")) Someone really didn't like whitespace :) Glad to see it rewritten to keep the patch checker happy. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2NHRWUKJPLBHITHKOTLOB 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/ iQEcBAEBCAAGBQJRSRtwAAoJEKeha0olJ0NqMfkH/iy45xsrYnjDI8hcuQyzNfgc VgVthAcJTdxOTk1Whq5HQW7161ODhfBf/2XMfXBAwtlGlUgVxFiCW+dqyHt0HER9 lrCBayF7z5GnAPoFlLHJRNUYGCyIvuawtFDwdVso3ohaqIiJtaXkO8khBw/xQQbP jKCYNeQg7o3TWmisrStlE0MbxjZuyvcGNFM8rWeR5VeeU3/TqrlR2gSqPbwSIhfo 8ppMZqwjw2EAPHdbZkGbj4vZGt/G1qb/f0uFzJXdtRoCnbfLeTQa5hJX3vA53Wbm 8/9PngkJr6DsH4863x3McU2N0ClLW7lfynbVH16LuOTzcRHm2Ddh37TzxezJfwM= =5XlV -----END PGP SIGNATURE----- ------enig2NHRWUKJPLBHITHKOTLOB--