From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJSpU-0005yI-NR for qemu-devel@nongnu.org; Thu, 05 Feb 2015 15:15:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJSpQ-0002yi-AA for qemu-devel@nongnu.org; Thu, 05 Feb 2015 15:15:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJSpQ-0002wH-3W for qemu-devel@nongnu.org; Thu, 05 Feb 2015 15:15:08 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t15KF6OM010517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 15:15:06 -0500 Message-ID: <54D3CF49.8070406@redhat.com> Date: Thu, 05 Feb 2015 13:15:05 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423162705-32065-1-git-send-email-mreitz@redhat.com> <1423162705-32065-4-git-send-email-mreitz@redhat.com> In-Reply-To: <1423162705-32065-4-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QPJs9xUMAqGKcjdcjpCNPHWFqXvVkEXNL" Subject: Re: [Qemu-devel] [PATCH v4 03/16] block: Add Error parameter to bdrv_find_protocol() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QPJs9xUMAqGKcjdcjpCNPHWFqXvVkEXNL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/05/2015 11:58 AM, Max Reitz wrote: > The argument given to bdrv_find_protocol() is just a file name, which > makes it difficult for the caller to reconstruct what protocol > bdrv_find_protocol() was hoping to find. This patch adds an Error > parameter to that function to solve this issue. >=20 > Suggested-by: Eric Blake > Signed-off-by: Max Reitz > --- > block.c | 14 +++++++------- > block/sheepdog.c | 2 +- > include/block/block.h | 3 ++- > qemu-img.c | 11 +++++++---- > tests/qemu-iotests/051.out | 4 ++-- > 5 files changed, 19 insertions(+), 15 deletions(-) >=20 > Testing: -hda foo:bar > -QEMU_PROG: -hda foo:bar: could not open disk image foo:bar: Unknown pr= otocol > +QEMU_PROG: -hda foo:bar: could not open disk image foo:bar: Unknown pr= otocol 'foo' > =20 Indeed a nicer message. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --QPJs9xUMAqGKcjdcjpCNPHWFqXvVkEXNL 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU089JAAoJEKeha0olJ0Nqi6UH+waoZZIWzNPQAtArck8/sOF1 tgNxuMzhi25nmzLZZv/nSW9B41muR0v0l/mnskm/8od7O2tbgVGm2E9lni13MYeF 9DutYaSWr6IRftl32v8EVNZAAO3FjkPuBNP7H7mJUeUPJJAD8YBgHhdyo71BrMM5 MXeP86eKHoV7tUBWs4AjmZ/UxNY+8+h+qo4vWqsZKMZ0lkWJy1Uk/KzE/hNStQZJ T0qsQJGrlVdS94yHrnezT46I4JCWajVC8mqpOdF1l6twnsL6VcEBzKyIzzKagSVE wKqXvLY8+iNzCfTA/2m6xNV8I6gqBWq54BUvL4VSS7crO9YoUxDs+eajs9SoVFw= =YM/v -----END PGP SIGNATURE----- --QPJs9xUMAqGKcjdcjpCNPHWFqXvVkEXNL--