[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 03/16] block: Add Error parameter to bdrv_fin
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 03/16] block: Add Error parameter to bdrv_find_protocol() |
Date: |
Thu, 05 Feb 2015 13:15:05 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
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.
>
> Suggested-by: Eric Blake <address@hidden>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> 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(-)
>
> Testing: -hda foo:bar
> -QEMU_PROG: -hda foo:bar: could not open disk image foo:bar: Unknown protocol
> +QEMU_PROG: -hda foo:bar: could not open disk image foo:bar: Unknown protocol
> 'foo'
>
Indeed a nicer message.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 04/16] iotests: Add test for driver=qcow2, format=qcow2, (continued)
- [Qemu-devel] [PATCH v4 04/16] iotests: Add test for driver=qcow2, format=qcow2, Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 01/16] block: Lift some BDS functions to the BlockBackend, Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 05/16] blockdev: Use blk_new_open() in blockdev_init(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 03/16] block: Add Error parameter to bdrv_find_protocol(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 07/16] qemu-img: Use blk_new_open() in img_open(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 06/16] block/xen: Use blk_new_open() in blk_connect(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 08/16] qemu-img: Use blk_new_open() in img_rebase(), Max Reitz, 2015/02/05