From: Marcel Apfelbaum <marcel@redhat.com>
To: Michal Privoznik <mprivozn@redhat.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com, marcel.a@redhat.com
Subject: Re: [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling
Date: Thu, 08 Jan 2015 18:44:39 +0200 [thread overview]
Message-ID: <54AEB3F7.3000602@redhat.com> (raw)
In-Reply-To: <f8d51d0ff71937c0aacf37c7c811adad82038697.1420733318.git.mprivozn@redhat.com>
On 01/08/2015 06:09 PM, Michal Privoznik wrote:
> Well, after 49d2e648e8087 the options to -machine parameter no longer
> has .desc nor .desc->type. That's mainly because the options are
> dynamically added while .desc is allocated statically. Anyway, if user
> tries to run:
>
> qemu-system-x86_64 -machine pc-i440fx-2.2,accel=kvm,usb=off
>
> the arguments evaluation fails with:
>
> qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type ==
> QEMU_OPT_BOOL' failed.
>
> Fix this by dropping the assert() which is useless after the mentioned
> commit anyway.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
> util/qemu-option.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index a708241..478420f 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -384,7 +384,6 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
> ret = opt->value.boolean;
> if (del) {
> qemu_opt_del_all(opts, name);
>
Hi Michal,
Thank you for the patch, but there is already a PULL request for a fix.
You can follow the details in this mail thread
https://www.mail-archive.com/qemu-devel@nongnu.org/msg272607.html
Thank you,
Marcel
next prev parent reply other threads:[~2015-01-08 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 16:09 [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling Michal Privoznik
2015-01-08 16:39 ` Eric Blake
2015-01-08 16:44 ` Marcel Apfelbaum [this message]
2015-01-08 17:14 ` Paolo Bonzini
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=54AEB3F7.3000602@redhat.com \
--to=marcel@redhat.com \
--cc=marcel.a@redhat.com \
--cc=mprivozn@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).