From patchwork Wed Dec 24 09:30:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 423887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 307AD1400D5 for ; Wed, 24 Dec 2014 20:30:58 +1100 (AEDT) Received: from localhost ([::1]:47532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3iHP-0007tl-2X for incoming@patchwork.ozlabs.org; Wed, 24 Dec 2014 04:30:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3iH2-0007WW-Ej for qemu-devel@nongnu.org; Wed, 24 Dec 2014 04:30:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y3iGz-0006bo-9l for qemu-devel@nongnu.org; Wed, 24 Dec 2014 04:30:32 -0500 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:38411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3iGy-0006bH-UW for qemu-devel@nongnu.org; Wed, 24 Dec 2014 04:30:29 -0500 Received: by mail-wg0-f48.google.com with SMTP id y19so10874016wgg.21 for ; Wed, 24 Dec 2014 01:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:newsgroups:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=R0k71xwa0bUvlCpPDIUZZrGE/4I23Cb5PwiAj7NgL9o=; b=O2bQkbuBoSCN2fR1J8VjMz8t3wfzBW4s+4inYx/8QqATQmUvGeoKbRQaj2mEv7lCdq HiJb/ALVgngzkoal2ac7C6oNPirwecdH9Y1Yngemy+0skHf85iBd+D/+u/QxcwJhZ4Xm QbBf+c+UEftGZIW2hP9oBVncNOLhNieNaVyCSAAmbqqST0g7HAV0CQ57elEMG8WRF0NI K5H++9zeOX4Fvo9ZFOvTQTQLllx36ZqtbfKR3RYXxXYriZBoJuwEW3aqfsRwawP7w2Qx fQpNAQisyi9j28TlFT00U4nN6Oe2ZdrykoNHrUT46VnYXLq9yxkcUtYW6e7FWVQw/zi+ gk8A== X-Received: by 10.194.192.167 with SMTP id hh7mr24005100wjc.111.1419413428366; Wed, 24 Dec 2014 01:30:28 -0800 (PST) Received: from [192.168.10.150] (net-37-117-147-67.cust.vodafonedsl.it. [37.117.147.67]) by mx.google.com with ESMTPSA id wb9sm20469992wic.20.2014.12.24.01.30.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Dec 2014 01:30:26 -0800 (PST) Message-ID: <549A87B0.7010002@redhat.com> Date: Wed, 24 Dec 2014 10:30:24 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 Newsgroups: gmane.comp.emulators.qemu To: Laszlo Ersek , Marcel Apfelbaum References: <5499E8D4.4010903@redhat.com> In-Reply-To: <5499E8D4.4010903@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::230 Cc: qemu devel list Subject: Re: [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list") X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 23/12/2014 23:12, Laszlo Ersek wrote: > Apologies if this problem is known. After building qemu at ab0302ee: > > $ qemu-system-x86_64 -usb > > qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Does this work? qemu_opt_del_all(opts, name); @@ -420,7 +420,7 @@ static uint64_t qemu_opt_get_number_helper(QemuOpts *opts, const char *name, } return ret; } - assert(opt->desc && opt->desc->type == QEMU_OPT_NUMBER); + assert(!opt->desc || opt->desc->type == QEMU_OPT_NUMBER); ret = opt->value.uint; if (del) { qemu_opt_del_all(opts, name); @@ -457,7 +457,7 @@ static uint64_t qemu_opt_get_size_helper(QemuOpts *opts, const char *name, } return ret; } - assert(opt->desc && opt->desc->type == QEMU_OPT_SIZE); + assert(!opt->desc || opt->desc->type == QEMU_OPT_SIZE); ret = opt->value.uint; if (del) { qemu_opt_del_all(opts, name); Paolo Tested-by: Laszlo Ersek diff --git a/util/qemu-option.c b/util/qemu-option.c index a708241..4f1f86a 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -384,7 +384,7 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name, } return ret; } - assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL); + assert(!opt->desc || opt->desc->type == QEMU_OPT_BOOL); ret = opt->value.boolean; if (del) {