[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: fix formatting of error
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: fix formatting of error message |
Date: |
Wed, 6 Apr 2016 08:10:59 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 |
On 04/06/2016 03:16 AM, Daniel P. Berrange wrote:
> The error_reportf_err() will not automatically append a
> ': ' before adding its suffix, so we must include that
> in the message we pass it, otherwise we get a badly
> formatted message lacking whitespace:
>
> qemu-img: Could not open
> 'driver=nbd,host=127.0.0.1,port=6666,tls-creds=tls0'Failed to connect socket:
> Connection refused
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> qemu-img.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
>
> diff --git a/qemu-img.c b/qemu-img.c
> index 06264d9..17c5cfd 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -256,7 +256,7 @@ static BlockBackend *img_open_opts(const char *optstr,
> options = qemu_opts_to_qdict(opts, NULL);
> blk = blk_new_open(NULL, NULL, options, flags, &local_err);
> if (!blk) {
> - error_reportf_err(local_err, "Could not open '%s'", optstr);
> + error_reportf_err(local_err, "Could not open '%s': ", optstr);
> return NULL;
> }
> blk_set_enable_write_cache(blk, !writethrough);
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature