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 <ebl...@redhat.com>
> Signed-off-by: Max Reitz <mre...@redhat.com>
> ---
>  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 <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to