From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9GCV-0005H0-85 for qemu-devel@nongnu.org; Thu, 08 Jan 2015 11:44:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9GCR-00038F-83 for qemu-devel@nongnu.org; Thu, 08 Jan 2015 11:44:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9GCR-000381-0g for qemu-devel@nongnu.org; Thu, 08 Jan 2015 11:44:43 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t08Gifsp023439 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 8 Jan 2015 11:44:42 -0500 Message-ID: <54AEB3F7.3000602@redhat.com> Date: Thu, 08 Jan 2015 18:44:39 +0200 From: Marcel Apfelbaum MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik , qemu-devel@nongnu.org Cc: stefanha@redhat.com, marcel.a@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 > --- > 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