From: Jeff Cody <jcody@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block jobs: Improve error message for missing job ID
Date: Tue, 16 Aug 2016 10:10:11 -0400 [thread overview]
Message-ID: <20160816141011.GE2950@localhost.localdomain> (raw)
In-Reply-To: <1471356130-9551-1-git-send-email-kwolf@redhat.com>
On Tue, Aug 16, 2016 at 04:02:10PM +0200, Kevin Wolf wrote:
> If a block job is started with a node name rather than a device name and
> no explicit job ID is passed, it was reported that '' isn't a
> well-formed ID. Which is correct, but we can make the message a little
> bit nicer.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> blockjob.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/blockjob.c b/blockjob.c
> index a5ba3be..a167f96 100644
> --- a/blockjob.c
> +++ b/blockjob.c
> @@ -132,6 +132,10 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver,
>
> if (job_id == NULL) {
> job_id = bdrv_get_device_name(bs);
> + if (!*job_id) {
> + error_setg(errp, "An explicit job ID is required for this node");
> + return NULL;
> + }
> }
>
> if (!id_wellformed(job_id)) {
> --
> 1.8.3.1
>
>
Reviewed-by: Jeff Cody <jcody@redhat.com>
next prev parent reply other threads:[~2016-08-16 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 14:02 [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID Kevin Wolf
2016-08-16 14:10 ` Jeff Cody [this message]
2016-08-16 14:11 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-08-17 8:28 ` Stefan Hajnoczi
2016-08-17 9:08 ` [Qemu-devel] " Kevin Wolf
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=20160816141011.GE2950@localhost.localdomain \
--to=jcody@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).