From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-img: fix formatting of error message
Date: Wed, 6 Apr 2016 08:10:59 -0600 [thread overview]
Message-ID: <570518F3.30307@redhat.com> (raw)
In-Reply-To: <1459934178-6142-1-git-send-email-berrange@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
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 <berrange@redhat.com>
> ---
> qemu-img.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2016-04-06 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 9:16 [Qemu-devel] [PATCH] qemu-img: fix formatting of error message Daniel P. Berrange
2016-04-06 10:43 ` Kevin Wolf
2016-04-06 14:10 ` Eric Blake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570518F3.30307@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).