From patchwork Wed Jun 15 20:32:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 636056 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 3rVJDb6Rn7z9t0t for ; Thu, 16 Jun 2016 06:35:27 +1000 (AEST) Received: from localhost ([::1]:44913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDHX3-0001kA-Q8 for incoming@patchwork.ozlabs.org; Wed, 15 Jun 2016 16:35:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDHUt-0008Ra-LF for qemu-devel@nongnu.org; Wed, 15 Jun 2016 16:33:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDHUn-0005jX-Hd for qemu-devel@nongnu.org; Wed, 15 Jun 2016 16:33:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDHUn-0005jQ-CB for qemu-devel@nongnu.org; Wed, 15 Jun 2016 16:33:05 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F29DDC04B307 for ; Wed, 15 Jun 2016 20:33:04 +0000 (UTC) Received: from localhost (vpn1-7-145.gru2.redhat.com [10.97.7.145]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5FKX39s015097; Wed, 15 Jun 2016 16:33:04 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org, Markus Armbruster Date: Wed, 15 Jun 2016 17:32:44 -0300 Message-Id: <1466022773-8965-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1466022773-8965-1-git-send-email-ehabkost@redhat.com> References: <1466022773-8965-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 15 Jun 2016 20:33:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 01/10] qdev: Don't stop applying globals on first error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcel Apfelbaum , Paolo Bonzini , Igor Mammedov Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" qdev_prop_set_globals_for_type() stops applying global properties on the first error. It is a leftover from when QEMU exited on any error when applying global property. Now we print a warning about the first error, bug ignore all other global properties after it. For example, the following command-line will not set CPUID level to 3, but will warn only about "x86_64-cpu.vendor" being ignored. $ ./x86_64-softmmu/qemu-system-x86_64 \ -global x86_64-cpu.vendor=x \ -global x86_64-cpu.level=3 qemu-system-x86_64: Warning: global x86_64-cpu.vendor=x ignored: Property '.vendor' doesn't take value 'x' Fix this by not returning from qdev_prop_set_globals_for_type() on the first error. Cc: Markus Armbruster Signed-off-by: Eduardo Habkost Reviewed-by: Marcel Apfelbaum Reviewed-by: Markus Armbruster --- hw/core/qdev-properties.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index e3b2184..c10edee 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1088,7 +1088,6 @@ static void qdev_prop_set_globals_for_type(DeviceState *dev, assert(prop->user_provided); error_reportf_err(err, "Warning: global %s.%s=%s ignored: ", prop->driver, prop->property, prop->value); - return; } } }