From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Fec-00078A-Hb for qemu-devel@nongnu.org; Thu, 08 Jan 2015 11:09:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9FeX-0006P6-Dv for qemu-devel@nongnu.org; Thu, 08 Jan 2015 11:09:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9FeX-0006P1-6U for qemu-devel@nongnu.org; Thu, 08 Jan 2015 11:09:41 -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 t08G9dvb026918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 8 Jan 2015 11:09:39 -0500 From: Michal Privoznik Date: Thu, 8 Jan 2015 17:09:33 +0100 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, marcel.a@redhat.com 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); -- 2.0.5