From patchwork Fri Oct 30 20:21:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JDEz2L9A; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDHy151Fz9sSC for ; Sat, 31 Oct 2020 07:22:22 +1100 (AEDT) Received: from localhost ([::1]:40848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYaui-0000Ak-25 for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:22:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYau3-0000AV-QR for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYau2-0007gy-7J for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kbIlRTm+g9R66uhaUJCj2lh/+Y5iGPaNhJsZTxBhXm8=; b=JDEz2L9ATinqIVUggOqW3IDpgp4uCU5t4F8KybEq02CnvpOzgUonVs+eaNHQBAMIpvdzLv jE9ki9PesrGMrkc91EmJzKvRV+76AXARFAk9tRtPdQliJpcGvGGGNplAILti8mBWXdW7mR +9JL+m64XgatHnNIW2GK5MY8Bxwb/BI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-3zW1hjSoOD6pOC8elCznyw-1; Fri, 30 Oct 2020 16:21:35 -0400 X-MC-Unique: 3zW1hjSoOD6pOC8elCznyw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D4EE1019632 for ; Fri, 30 Oct 2020 20:21:34 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1A9F18E51; Fri, 30 Oct 2020 20:21:33 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 01/20] qom: Add prefix to error message inside object_property_parse() Date: Fri, 30 Oct 2020 16:21:12 -0400 Message-Id: <20201030202131.796967-2-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 01:22:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Make object_property_parse() automatically add a error message prefix mentioning the QOM type and property name when encountering errors. As we have a large number of functions that add their own "Property '...'" to the error messages, add a temporary check for existing prefixes before prepending our own. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- qom/object.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qom/object.c b/qom/object.c index 20726e4584..6fb1657724 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1635,9 +1635,20 @@ int object_property_get_enum(Object *obj, const char *name, bool object_property_parse(Object *obj, const char *name, const char *string, Error **errp) { + ERRP_GUARD(); Visitor *v = string_input_visitor_new(string); bool ok = object_property_set(obj, name, v, errp); + if (!ok) { + /* + * Temporary check for existing prefix, until all error reporting + * functions remove their own prefix. + */ + if (!g_str_has_prefix(error_get_pretty(*errp), "Property '")) { + error_prepend(errp, "Property '%s.%s' can't take value '%s': ", + object_get_typename(obj), name, string); + } + } visit_free(v); return ok; } From patchwork Fri Oct 30 20:21:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BFPC9Ocq; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDLm03Cbz9sRR for ; Sat, 31 Oct 2020 07:24:46 +1100 (AEDT) Received: from localhost ([::1]:49124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYax1-0003g8-PU for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:24:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYau5-0000C2-LS for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYau3-0007h9-VQ for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+iBjVC7xcw6X3t+JOTGvDiD6Rn9cdGic8J7WThIGNg=; b=BFPC9OcqBo5Pc3W2aG1IqnBZlmVnfWFZ5n1lHLFv5fHKwNf1Ea9anTl1zkAcq80hsY1+EJ kPkUDgDjkuSCIGiBRo6lEPtcvDQ2dfp7Qr3PDWHl5QkokMylM0q4QqJzbBFfQyhXoA5GxT gCOwY06Xmiqwggt/5zy07n02rU7JOOw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-595-oEECHw-IPIGvlfqNIfZITA-1; Fri, 30 Oct 2020 16:21:36 -0400 X-MC-Unique: oEECHw-IPIGvlfqNIfZITA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2245A805F12 for ; Fri, 30 Oct 2020 20:21:35 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF8325D9D2; Fri, 30 Oct 2020 20:21:34 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 02/20] qdev: Stop using error_set_from_qdev_prop_error() for netdev property Date: Fri, 30 Oct 2020 16:21:13 -0400 Message-Id: <20201030202131.796967-3-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device e1000,netdev=n0 qemu-system-x86_64: -device e1000,netdev=n0: Property 'e1000.netdev' can't find value 'n0' $ qemu-system-x86_64 -netdev id=n0,type=user -device e1000,netdev=n0 -device e1000,netdev=n0 qemu-system-x86_64: -device e1000,netdev=n0: Property 'e1000.netdev' can't take value 'n0', it's in use After: $ ./qemu-system-x86_64 -device e1000,netdev=n0 qemu-system-x86_64: -device e1000,netdev=n0: Property 'e1000.netdev' can't take value 'n0': netdev not found $ ./qemu-system-x86_64 -netdev id=n0,type=user -device e1000,netdev=n0 -device e1000,netdev=n0 qemu-system-x86_64: -device e1000,netdev=n0: Property 'e1000.netdev' can't take value 'n0': netdev is in use Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 232ff955fa..60be09efba 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -376,7 +376,7 @@ static void set_netdev(Object *obj, Visitor *v, const char *name, NICPeers *peers_ptr = object_static_prop_ptr(obj, prop); NetClientState **ncs = peers_ptr->ncs; NetClientState *peers[MAX_QUEUE_NUM]; - int queues, err = 0, i = 0; + int queues, i = 0; char *str; if (!visit_type_str(v, name, &str, errp)) { @@ -387,7 +387,7 @@ static void set_netdev(Object *obj, Visitor *v, const char *name, NET_CLIENT_DRIVER_NIC, MAX_QUEUE_NUM); if (queues == 0) { - err = -ENOENT; + error_setg(errp, "netdev not found"); goto out; } @@ -399,7 +399,7 @@ static void set_netdev(Object *obj, Visitor *v, const char *name, for (i = 0; i < queues; i++) { if (peers[i]->peer) { - err = -EEXIST; + error_setg(errp, "netdev is in use"); goto out; } @@ -418,7 +418,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name, peers_ptr->queues = queues; out: - error_set_from_qdev_prop_error(errp, err, obj, prop, str); g_free(str); } From patchwork Fri Oct 30 20:21:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391296 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gUAMDIS4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDJ16WBlz9sRR for ; Sat, 31 Oct 2020 07:22:25 +1100 (AEDT) Received: from localhost ([::1]:40998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYaul-0000FR-P7 for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:22:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYau5-0000Bo-G2 for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYau3-0007hA-Si for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=heSHQZUMbRn1It5jncQ6+b74Z3Hrufzin1N4upH9idU=; b=gUAMDIS4zaS5oMiqIwJse0UmuE4p3Rdp8uvrjyvrlYAV2g0GCpzMaD73u64qJ8ktXGmh74 /0THZUzO2zuQI28ZQgBoFInVLiRIacETN3TQfqg3hpuKb9o2Fu282Jmon/IWkAyAxitI0F vPNw4TXspIEvPq1vB1GsNosTLziKOxg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-469-voZOZUAqMsCf7N5J3hFq5A-1; Fri, 30 Oct 2020 16:21:37 -0400 X-MC-Unique: voZOZUAqMsCf7N5J3hFq5A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 73E0F18A2257 for ; Fri, 30 Oct 2020 20:21:36 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 417455D9D2; Fri, 30 Oct 2020 20:21:36 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 03/20] qdev: Stop using error_set_from_qdev_prop_error() for audiodev property Date: Fri, 30 Oct 2020 16:21:14 -0400 Message-Id: <20201030202131.796967-4-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device AC97,audiodev=a0 qemu-system-x86_64: -device AC97,audiodev=a0: Property 'AC97.audiodev' can't find value 'a0' After: $ ./qemu-system-x86_64 -device AC97,audiodev=a0 qemu-system-x86_64: -device AC97,audiodev=a0: Property 'AC97.audiodev' can't take value 'a0': audiodev not found Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 60be09efba..a5a1a6ffee 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -447,7 +447,6 @@ static void set_audiodev(Object *obj, Visitor *v, const char* name, Property *prop = opaque; QEMUSoundCard *card = object_static_prop_ptr(obj, prop); AudioState *state; - int err = 0; char *str; if (!visit_type_str(v, name, &str, errp)) { @@ -457,13 +456,12 @@ static void set_audiodev(Object *obj, Visitor *v, const char* name, state = audio_state_by_name(str); if (!state) { - err = -ENOENT; + error_setg(errp, "audiodev not found"); goto out; } card->state = state; out: - error_set_from_qdev_prop_error(errp, err, obj, prop, str); g_free(str); } From patchwork Fri Oct 30 20:21:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=S1/V9Hfk; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDJ30Fwwz9sRR for ; Sat, 31 Oct 2020 07:22:27 +1100 (AEDT) Received: from localhost ([::1]:41070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYaum-0000HT-Sp for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:22:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYau6-0000Eh-Su for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYau4-0007hO-Tw for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IOX1B2ywU49qOzfq+/i+SXG8+eWS0AeocjQ/XNxwOzE=; b=S1/V9HfkdMVCivMrYesBPBqc1u1ctm+JvX5MvlyJ/n3RHveL0oqykmJwokl0OAS53czpl1 LbbrGxclv4sjQOHFfVSrNY97cMys+IYFGrOT0cOjAbah+Gc4fcZE/Roczzv6Jhe9vaXYWs B/4j8Z1I8BX+fSHciBV9piPzCm/r3Mw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-60-QVxOgdo8O7yVGAHeRIn0zg-1; Fri, 30 Oct 2020 16:21:38 -0400 X-MC-Unique: QVxOgdo8O7yVGAHeRIn0zg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 67FAE18A225C for ; Fri, 30 Oct 2020 20:21:37 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2AAA05C1CF; Fri, 30 Oct 2020 20:21:37 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 04/20] qdev: Stop using error_set_from_qdev_prop_error() for mac property Date: Fri, 30 Oct 2020 16:21:15 -0400 Message-Id: <20201030202131.796967-5-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 01:22:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device e1000,mac=x qemu-system-x86_64: -device e1000,mac=x: Property 'e1000.mac' doesn't take value 'x' After: $ qemu-system-x86_64 -device e1000,mac=x qemu-system-x86_64: -device e1000,mac=x: Property 'e1000.mac' can't take value 'x': invalid mac address Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index a5a1a6ffee..fc0abcae17 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -336,7 +336,7 @@ static void set_mac(Object *obj, Visitor *v, const char *name, void *opaque, return; inval: - error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str); + error_setg(errp, "invalid mac address"); g_free(str); } From patchwork Fri Oct 30 20:21:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391300 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=d2sf5OdM; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDLn04Jjz9sRR for ; Sat, 31 Oct 2020 07:24:48 +1100 (AEDT) Received: from localhost ([::1]:49444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYax4-0003nw-LO for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:24:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYau7-0000GZ-L8 for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYau6-0007he-2c for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y+ETHuJHJ4SgmolQsEBNReIoHbZc9iqX+ntcUJXw3JQ=; b=d2sf5OdMqTSAnxpbkNoUyX+uZQZi8d7qFQHjWFFoaK31uHxf9MgVsf9bWCN6niJxtATLuS LIVE/CPcTRqRqamKvbypKVBTPI/e4qwtrVghFoThaGCEjE2epwZo3ZWPYupbeQZnQml8J6 CYDFAlsnF9DLBqQoBHZEDyGcuL4WMIA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-307-3Qgk7EmYP3-HSmr7seP6-w-1; Fri, 30 Oct 2020 16:21:39 -0400 X-MC-Unique: 3Qgk7EmYP3-HSmr7seP6-w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92877802B63 for ; Fri, 30 Oct 2020 20:21:38 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 228441002C01; Fri, 30 Oct 2020 20:21:38 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 05/20] qdev: Stop using error_set_from_qdev_prop_error() for devfn property Date: Fri, 30 Oct 2020 16:21:16 -0400 Message-Id: <20201030202131.796967-6-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device e1000,addr=x qemu-system-x86_64: -device e1000,addr=x: Property 'e1000.addr' doesn't take value 'x' After: $ qemu-system-x86_64 -device e1000,addr=x qemu-system-x86_64: -device e1000,addr=x: Property 'e1000.addr' can't take value 'x': invalid PCI address Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index fc0abcae17..5d3cb32708 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -742,7 +742,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name, return; invalid: - error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str); + error_setg(errp, "invalid PCI address"); g_free(str); } From patchwork Fri Oct 30 20:21:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=d7dBsoCa; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDP50DNkz9sRR for ; Sat, 31 Oct 2020 07:26:49 +1100 (AEDT) Received: from localhost ([::1]:57788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYaz0-0007Hk-VZ for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:26:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauB-0000RP-AS for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYau9-0007i2-Kq for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gW8t/u1GvE0ZZGBmo/WYAyMqpPvRNCVcucwpa4P5Mkw=; b=d7dBsoCaWoKkJdfTeeEIc4rTKtOSTOqY/XIOw5+5R/IUMaJ8DV49Xtc+j7v3ukCMoh/Tye HC/Pb3gQujIJjw0phxqHIGPl1mE6nWcdb6Xt695cXVbqUljwZoRj+FShukNs8p7LYGCI/o B6ya3w6HvnciRMY75Mpb93Cm8zuw5Gs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-527-snA03sb3P2a7Rs7GYcBFMQ-1; Fri, 30 Oct 2020 16:21:40 -0400 X-MC-Unique: snA03sb3P2a7Rs7GYcBFMQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D1D98108597C for ; Fri, 30 Oct 2020 20:21:39 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 950961002C01; Fri, 30 Oct 2020 20:21:39 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 06/20] qdev: Stop using error_set_from_qdev_prop_error() for PCI host device property Date: Fri, 30 Oct 2020 16:21:17 -0400 Message-Id: <20201030202131.796967-7-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device vfio-pci,host=x qemu-system-x86_64: -device vfio-pci,host=x: Property 'vfio-pci.host' doesn't take value 'x' After: $ qemu-system-x86_64 -device vfio-pci,host=x qemu-system-x86_64: -device vfio-pci,host=x: Property 'vfio-pci.host' can't take value 'x': invalid host device address Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 5d3cb32708..0290d64bf1 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -859,7 +859,7 @@ static void set_pci_host_devaddr(Object *obj, Visitor *v, const char *name, return; inval: - error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str); + error_setg(errp, "invalid host device address"); g_free(str); } From patchwork Fri Oct 30 20:21:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=M+F6cwqJ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDVR1bpwz9sSC for ; Sat, 31 Oct 2020 07:31:27 +1100 (AEDT) Received: from localhost ([::1]:45064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb3V-0005Ko-7P for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:31:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauF-0000by-8E for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59383) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauD-0007ib-N5 for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/jnic1NLVi3yOaelWu2Ae/wYwDuJiLbjp5nCA3Fl1x4=; b=M+F6cwqJXA7oDgSYl+Ut09K3y+wa98PaUiz+lICkfipWkUt5MDD9P8k2ig/l1zJR4SvoG2 LiVbbQQXoHrhbAw4uHd3h6ihSXkRRC37afIK+X2Mewh8ft1i6XEWMvyveuSQWHPEyR127T yGBn+Dv4+mBJMGGR0pWXrvpQ7OIShv0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-525-NSLM91z4N6OuFujU9Tn1YQ-1; Fri, 30 Oct 2020 16:21:45 -0400 X-MC-Unique: NSLM91z4N6OuFujU9Tn1YQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2D6B108597F; Fri, 30 Oct 2020 20:21:43 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id A55301002C01; Fri, 30 Oct 2020 20:21:40 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 07/20] qdev: Stop using error_set_from_qdev_prop_error() for css devno property Date: Fri, 30 Oct 2020 16:21:18 -0400 Message-Id: <20201030202131.796967-8-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , David Hildenbrand , Cornelia Huck , Markus Armbruster , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-s390x -device x-terminal3270,devno=x qemu-system-s390x: -device x-terminal3270,devno=x: Property 'x-terminal3270.devno' doesn't take value 'x' After: $ qemu-system-s390x -device x-terminal3270,devno=x qemu-system-s390x: -device x-terminal3270,devno=x: Property 'x-terminal3270.devno' can't take value 'x': invalid devno Signed-off-by: Eduardo Habkost --- Cc: Cornelia Huck Cc: Thomas Huth Cc: Richard Henderson Cc: David Hildenbrand Cc: Halil Pasic Cc: Christian Borntraeger Cc: qemu-s390x@nongnu.org Cc: qemu-devel@nongnu.org --- hw/s390x/css.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/css.c b/hw/s390x/css.c index c8e7ce232a..ad631bad29 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -2384,7 +2384,7 @@ static void set_css_devid(Object *obj, Visitor *v, const char *name, num = sscanf(str, "%2x.%1x%n.%4x%n", &cssid, &ssid, &n1, &devid, &n2); if (num != 3 || (n2 - n1) != 5 || strlen(str) != n2) { - error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str); + error_setg(errp, "invalid devno"); goto out; } if ((cssid > MAX_CSSID) || (ssid > MAX_SSID)) { From patchwork Fri Oct 30 20:21:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=as7XOvV1; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDRZ3wHpz9sSC for ; Sat, 31 Oct 2020 07:28:58 +1100 (AEDT) Received: from localhost ([::1]:37946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb16-0002Ha-Ez for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:28:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauE-0000a6-Mi for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauC-0007iV-UX for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TkzKicG/kMOdvt3TdBS42FPTR69wOOGeaV4o4fkuaW4=; b=as7XOvV14mxgb3N1AaZIVtKjN660L0K0I0DNlZhr6Ranu1piXdVzB84IKEex4JVMWH0v0D y0RcmDMQHMQeVATe/UDqX/I1xSZs5FvYDE3VZuMD2IoVSq1zWLdu5v80uXQqxtsN9cSK+3 tSfo7I+C2g5zhqVshKuwRrf4jN1WqBA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-591-tN6AolSuOVGyszaNF52clg-1; Fri, 30 Oct 2020 16:21:46 -0400 X-MC-Unique: tN6AolSuOVGyszaNF52clg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8DBDA805EF6 for ; Fri, 30 Oct 2020 20:21:45 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02F075D9D2; Fri, 30 Oct 2020 20:21:44 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 08/20] qdev: Delete unused error_set_from_qdev_prop_error() function Date: Fri, 30 Oct 2020 16:21:19 -0400 Message-Id: <20201030202131.796967-9-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- include/hw/qdev-properties.h | 2 -- hw/core/qdev-properties.c | 22 ---------------------- 2 files changed, 24 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index a4ac1e6972..cca1a2153f 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -36,8 +36,6 @@ const GlobalProperty *qdev_find_global_prop(Object *obj, const char *name); int qdev_prop_check_globals(void); void qdev_prop_set_globals(DeviceState *dev); -void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj, - Property *prop, const char *value); /** * qdev_property_add_static: diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index c03842e89a..5fdfb3f5cd 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -85,28 +85,6 @@ static Property *qdev_prop_find(DeviceState *dev, const char *name) return NULL; } -void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj, - Property *prop, const char *value) -{ - switch (ret) { - case -EEXIST: - error_setg(errp, "Property '%s.%s' can't take value '%s', it's in use", - object_get_typename(obj), prop->name, value); - break; - default: - case -EINVAL: - error_setg(errp, QERR_PROPERTY_VALUE_BAD, - object_get_typename(obj), prop->name, value); - break; - case -ENOENT: - error_setg(errp, "Property '%s.%s' can't find value '%s'", - object_get_typename(obj), prop->name, value); - break; - case 0: - break; - } -} - void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value) { object_property_set_bool(OBJECT(dev), name, value, &error_abort); From patchwork Fri Oct 30 20:21:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Evs78EVf; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDXD62tjz9sSG for ; Sat, 31 Oct 2020 07:33:00 +1100 (AEDT) Received: from localhost ([::1]:48114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb50-0006fc-Jd for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:32:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauG-0000fQ-Ei for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:31192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauE-0007ij-Oy for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5LyirRpVHC7UoL3AJM165cC8818hveEFT1tftyvPBwA=; b=Evs78EVf7qt/5tivrwI+ofg5dYdeAJuJ1Qu49fd5pcc7h+b8v6fSDpoLpJtsOHzF0Xg7ok eNdqizYm+CJiyUa6mJdUDsG4YAwFD496+IOWu2muustxaQQ2V6df5dkqJLZoLLH7UAaVuT EiqITOO/pBP1GBxeLvk2aH5m1UT03mM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-584-hP2GzQgmOwGHeCL3L6_4uA-1; Fri, 30 Oct 2020 16:21:48 -0400 X-MC-Unique: hP2GzQgmOwGHeCL3L6_4uA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F2717107AD28; Fri, 30 Oct 2020 20:21:46 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BA0555792; Fri, 30 Oct 2020 20:21:46 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 09/20] cryptodev: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:20 -0400 Message-Id: <20201030202131.796967-10-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 01:22:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Gonglei \(Arei\)" , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: "Gonglei (Arei)" Cc: qemu-devel@nongnu.org --- backends/cryptodev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/cryptodev.c b/backends/cryptodev.c index 3f141f61ed..e3cd90619c 100644 --- a/backends/cryptodev.c +++ b/backends/cryptodev.c @@ -160,8 +160,7 @@ cryptodev_backend_set_queues(Object *obj, Visitor *v, const char *name, return; } if (!value) { - error_setg(errp, "Property '%s.%s' doesn't take value '%" PRIu32 "'", - object_get_typename(obj), name, value); + error_setg(errp, "queues can't be zero"); return; } backend->conf.peers.queues = value; From patchwork Fri Oct 30 20:21:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PDR7wUws; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDLm1fpNz9sSC for ; Sat, 31 Oct 2020 07:24:46 +1100 (AEDT) Received: from localhost ([::1]:49110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYax1-0003fZ-CD for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:24:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauH-0000jG-Nj for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauG-0007k6-1t for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vZQHVjSJMF668x4UzpaNBLVz/DvKzoqy9uYRrP037O8=; b=PDR7wUws4tNEByo7K/ijT3XPa0muCwWJZFfavSxyTHkSsGTrcysDzledj2P3b2B4xZQ8/7 u49xHLpTCxCdAFnuudsTMNJUDokeUcXSSXqLiwwtRgrIQxwR/hyKRFhdSQsA1X3FbpETOG b6RazkQAqjIcqcIdL0Mu9dVfS3Z7JWw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-y5JOUccxOTSe7XNx_EDhhg-1; Fri, 30 Oct 2020 16:21:49 -0400 X-MC-Unique: y5JOUccxOTSe7XNx_EDhhg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C1BC101962E for ; Fri, 30 Oct 2020 20:21:48 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A2795D9D2; Fri, 30 Oct 2020 20:21:47 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 10/20] memfd: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:21 -0400 Message-Id: <20201030202131.796967-11-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 01:22:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Eduardo Habkost Cc: Igor Mammedov Cc: qemu-devel@nongnu.org --- backends/hostmem-memfd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c index e5626d4330..05cf743fe8 100644 --- a/backends/hostmem-memfd.c +++ b/backends/hostmem-memfd.c @@ -87,8 +87,7 @@ memfd_backend_set_hugetlbsize(Object *obj, Visitor *v, const char *name, return; } if (!value) { - error_setg(errp, "Property '%s.%s' doesn't take value '%" PRIu64 "'", - object_get_typename(obj), name, value); + error_setg(errp, "hugetlbsize can't be zero"); return; } m->hugetlbsize = value; From patchwork Fri Oct 30 20:21:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TZHoNpvZ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDZV10lcz9sRR for ; Sat, 31 Oct 2020 07:34:56 +1100 (AEDT) Received: from localhost ([::1]:55388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb6r-0001Ho-Mg for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:34:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauK-0000n8-4T for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:53146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauI-0007kM-DF for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OM4FMHrDZwjWnZb8rYTKxC3NKos0UkCNBEmHE0+Q7Mg=; b=TZHoNpvZEig5iJQIIiJGmvXLKjIVLzJs2w3SDVPRtmvrjSQvD7LqoBWGAKlGEpMZV4TnJ5 ClMcJV2ektpJYOShwIttST/MNhH5HrzoUnJAwPOK9rFVwVRK9avLPJQYSsgNF9aqI/2q+c B9IGPxhzzNk67od2+Xpxo5YdGIHcYoo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-132-mIU7fVcXO_mut1MQsvk-kg-1; Fri, 30 Oct 2020 16:21:51 -0400 X-MC-Unique: mIU7fVcXO_mut1MQsvk-kg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3C76760C4; Fri, 30 Oct 2020 20:21:50 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C0FD1002397; Fri, 30 Oct 2020 20:21:48 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 11/20] tpm_util: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:22 -0400 Message-Id: <20201030202131.796967-12-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 01:22:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Stefan Berger Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: qemu-devel@nongnu.org --- backends/tpm/tpm_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index 2b5f788861..012c71bc53 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -56,8 +56,7 @@ static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque, s = qemu_find_tpm_be(str); if (s == NULL) { - error_setg(errp, "Property '%s.%s' can't find value '%s'", - object_get_typename(obj), prop->name, str); + error_setg(errp, "tpm backend not found"); } else if (tpm_backend_init(s, TPM_IF(obj), errp) == 0) { *be = s; /* weak reference, avoid cyclic ref */ } From patchwork Fri Oct 30 20:21:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391304 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Vmbo7zYK; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDP84RPzz9sRR for ; Sat, 31 Oct 2020 07:26:52 +1100 (AEDT) Received: from localhost ([::1]:58018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYaz4-0007NF-KM for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:26:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauP-0000pY-59 for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauK-0007kZ-Aa for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sb/+dSSrHqAyU1tDNbl+mqJpOazWYo1gHH7SeW5Egp4=; b=Vmbo7zYKg5tiIxArVSQOuy2/JyiZvLikJ/rMkkyqvMtHYYsVasaDF4aC7hyczDDIgcY9wz eQMhGztUNJy3b2SpQV3PR8oiJh17zWfGuRZDiJ+o3JXYeXl89g5kk/6h01qhuk9zuTqJXZ I2SO/xJbaYr8j4Ti82NAGt7G+uk4HkE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-332-21IiiSVqNgWvhSuJeC-9Gg-1; Fri, 30 Oct 2020 16:21:52 -0400 X-MC-Unique: 21IiiSVqNgWvhSuJeC-9Gg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B69BA805EF4 for ; Fri, 30 Oct 2020 20:21:51 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D7966115F; Fri, 30 Oct 2020 20:21:51 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 12/20] qdev: drive: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:23 -0400 Message-Id: <20201030202131.796967-13-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 01:22:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 0290d64bf1..815eee8035 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -134,8 +134,7 @@ static void set_drive_helper(Object *obj, Visitor *v, const char *name, } } if (!blk) { - error_setg(errp, "Property '%s.%s' can't find value '%s'", - object_get_typename(OBJECT(dev)), prop->name, str); + error_setg(errp, "block backend not found"); goto fail; } if (blk_attach_dev(blk, dev) < 0) { From patchwork Fri Oct 30 20:21:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=J8EowlvL; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDMm3hFcz9sRR for ; Sat, 31 Oct 2020 07:25:40 +1100 (AEDT) Received: from localhost ([::1]:52368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYaxu-00050c-DA for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:25:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauN-0000of-8c for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauK-0007kb-AF for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:21:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HtAssr3+a6M+1T8evYjqF4+kuT250KbABypJsxRiXKQ=; b=J8EowlvLpTUDFRcmLud+j7OG4LpZuPN/Zn1xvGA/CkAfbAlyDX0QrTsWZOVxeT//Dar3pS NFRyY8PUF9FNjs3QHB4833MX0CeUanAAUmcuhHVaj9byhheQJ4B/jHW0WFiH7qXmZ6GD/b yb/myMvefvtvoZRQWTMYB7/HB2Op4JM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-553-ogrz7rKpMtiAv8MQp-d2QA-1; Fri, 30 Oct 2020 16:21:53 -0400 X-MC-Unique: ogrz7rKpMtiAv8MQp-d2QA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8893107AFD0 for ; Fri, 30 Oct 2020 20:21:52 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85A3026329; Fri, 30 Oct 2020 20:21:52 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 13/20] qdev: chardev: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:24 -0400 Message-Id: <20201030202131.796967-14-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 815eee8035..90799412be 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -248,11 +248,9 @@ static void set_chr(Object *obj, Visitor *v, const char *name, void *opaque, s = qemu_chr_find(str); if (s == NULL) { - error_setg(errp, "Property '%s.%s' can't find value '%s'", - object_get_typename(obj), prop->name, str); - } else if (!qemu_chr_fe_init(be, s, errp)) { - error_prepend(errp, "Property '%s.%s' can't take value '%s': ", - object_get_typename(obj), prop->name, str); + error_setg(errp, "chardev not found"); + } else { + qemu_chr_fe_init(be, s, errp); } g_free(str); } From patchwork Fri Oct 30 20:21:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GYIGkvfi; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDcJ410wz9sSC for ; Sat, 31 Oct 2020 07:36:32 +1100 (AEDT) Received: from localhost ([::1]:59034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb8Q-0002tz-Ij for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:36:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauR-0000qH-0V for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauM-0007kn-Tw for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rIGoZatzh3BhAf89B9vnOFWEPQx8h7d6im0PFz8uCpE=; b=GYIGkvfiY4ZJqBFpurey4uOeaOSw5wiFgr/HbOcuZjDGq/PcgWYqJZng+sXRHEeYs0z+Mj VCORmDKn6Pn3iHmWisSG35U6bxz8FlenK6YzkEutQrOSrmgLlmczMkWP2KJLiySnVP1zvy fhbDU9EwVTnpS3grYZYtxftHCWKjaqA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-125-kHrIiYv5NI-W_nSzUrdEBA-1; Fri, 30 Oct 2020 16:21:55 -0400 X-MC-Unique: kHrIiYv5NI-W_nSzUrdEBA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8EA3A107AFA5; Fri, 30 Oct 2020 20:21:54 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2498810023A7; Fri, 30 Oct 2020 20:21:53 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 14/20] i386: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:25 -0400 Message-Id: <20201030202131.796967-15-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Markus Armbruster , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0d8606958e..2c00f94308 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4529,7 +4529,7 @@ static void x86_cpuid_set_vendor(Object *obj, const char *value, int i; if (strlen(value) != CPUID_VENDOR_SZ) { - error_setg(errp, QERR_PROPERTY_VALUE_BAD, "", "vendor", value); + error_setg(errp, "invalid vendor ID"); return; } From patchwork Fri Oct 30 20:21:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391305 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RxDmRZHm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDQJ123Fz9sSC for ; Sat, 31 Oct 2020 07:27:52 +1100 (AEDT) Received: from localhost ([::1]:60794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb02-0008Vf-49 for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:27:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauS-0000qM-GL for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauO-0007ky-Rn for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mty3W0CgIANVUwhIgE6muUeVI4pQYAV+Fd6XYr8VBeU=; b=RxDmRZHmbWMlYdf2GNf6httbHh+peE8QaTBJm/1GDqi8wqwqQd/j/Calbc2jhRMi9FagY6 sKw4IIojiniyHY7zz4Hq1XCaWuZhL0DEaUXeUoIrxkch9gm4lE0/l0vqI4I9wamOmj1um5 jGMtZg4CTZP/ARybNjl5z8Zi4awu54Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-474-sZaKoXBLNEGwbFaKgU8oSA-1; Fri, 30 Oct 2020 16:21:57 -0400 X-MC-Unique: sZaKoXBLNEGwbFaKgU8oSA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B9A7393A5 for ; Fri, 30 Oct 2020 20:21:56 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id C05685D9D2; Fri, 30 Oct 2020 20:21:55 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 15/20] qerror: Delete unused QERR_PROPERTY_VALUE_BAD macro Date: Fri, 30 Oct 2020 16:21:26 -0400 Message-Id: <20201030202131.796967-16-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 01:22:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Eduardo Habkost --- Cc: Markus Armbruster Cc: qemu-devel@nongnu.org --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 7c76e24aa7..646a42c4b4 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -70,9 +70,6 @@ #define QERR_PERMISSION_DENIED \ "Insufficient permission to perform this operation" -#define QERR_PROPERTY_VALUE_BAD \ - "Property '%s.%s' doesn't take value '%s'" - #define QERR_PROPERTY_VALUE_OUT_OF_RANGE \ "Property %s.%s doesn't take value %" PRId64 " (minimum: %" PRId64 ", maximum: %" PRId64 ")" From patchwork Fri Oct 30 20:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391308 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FX1bYhhU; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDRj1hckz9sRR for ; Sat, 31 Oct 2020 07:29:05 +1100 (AEDT) Received: from localhost ([::1]:38252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb1D-0002QM-5t for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:29:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauW-0000t5-5f for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauS-0007lO-98 for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vrWVueLgktrjlllGr3tyae/SlYm3bdfuFcOIC8u+jjk=; b=FX1bYhhUI8JCK4hk3Rbu9h9v8TAOVDYiZdFKajeixIVwfInf1gDGumgN4HQJrwVE0U2Ffg koaijBeYSp1fvBKoFzFZc/Zw1gGlEKfXeRiVNw6A6gOElNLrm3RBENF73u4LWM9+BfT765 GbHyKQ5lGNc1fPlj16/M4V9jBAAt3wM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-DYTJn8J1MyCRN_E902ghpg-1; Fri, 30 Oct 2020 16:22:01 -0400 X-MC-Unique: DYTJn8J1MyCRN_E902ghpg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9412C802B6B; Fri, 30 Oct 2020 20:22:00 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF460109F193; Fri, 30 Oct 2020 20:21:56 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 16/20] nvdimm: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:27 -0400 Message-Id: <20201030202131.796967-17-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , "Michael S. Tsirkin" , Markus Armbruster , Xiao Guangrong Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Cc: Xiao Guangrong Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: qemu-devel@nongnu.org --- hw/mem/nvdimm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c index e1574bc07c..b9a99d58ed 100644 --- a/hw/mem/nvdimm.c +++ b/hw/mem/nvdimm.c @@ -56,8 +56,7 @@ static void nvdimm_set_label_size(Object *obj, Visitor *v, const char *name, return; } if (value < MIN_NAMESPACE_LABEL_SIZE) { - error_setg(errp, "Property '%s.%s' (0x%" PRIx64 ") is required" - " at least 0x%lx", object_get_typename(obj), name, value, + error_setg(errp, "label size should be at least 0x%lx", MIN_NAMESPACE_LABEL_SIZE); return; } @@ -89,8 +88,7 @@ static void nvdimm_set_uuid(Object *obj, Visitor *v, const char *name, } if (qemu_uuid_parse(value, &nvdimm->uuid) != 0) { - error_setg(errp, "Property '%s.%s' has invalid value", - object_get_typename(obj), name); + error_setg(errp, "invalid UUID"); } g_free(value); From patchwork Fri Oct 30 20:21:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391315 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SNcdYgpi; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDdl23m6z9sRR for ; Sat, 31 Oct 2020 07:37:47 +1100 (AEDT) Received: from localhost ([::1]:32924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb9d-0003pN-Ap for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:37:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYaua-0000uW-GI for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauV-0007lb-T3 for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HSOOxfNhrZ9l5ZrJ8GMDAt4DHKLA5YsaRSPlCu3byRQ=; b=SNcdYgpiTLNAPFLy6ScFif/bQxb4m/Gtu51n0eT7qv0eE+STnYcPCgXyLQSLi3nMCl9gKW c/WI6rhKmW5OKN0CRLkzz0J3wCZAwNyFD8FE8bG/l2owm/bTt+MlZX3bJJCA/nZQpQKGI6 /8PLy9NQ9uRkGxSkmBgfHcTo3Lsw1Ss= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-45-HPeGaDuTN2ilc2nQhs-VrQ-1; Fri, 30 Oct 2020 16:22:04 -0400 X-MC-Unique: HPeGaDuTN2ilc2nQhs-VrQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1A7D107AFB2; Fri, 30 Oct 2020 20:22:03 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21F1B6198D; Fri, 30 Oct 2020 20:22:02 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 17/20] colo-compare: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:28 -0400 Message-Id: <20201030202131.796967-18-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Jason Wang , Markus Armbruster , Li Zhijian Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Zhang Chen Cc: Li Zhijian Cc: Jason Wang Cc: qemu-devel@nongnu.org --- net/colo-compare.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 3a45d64175..ae61e32c5b 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -1097,8 +1097,7 @@ static void compare_set_timeout(Object *obj, Visitor *v, return; } if (!value) { - error_setg(errp, "Property '%s.%s' requires a positive value", - object_get_typename(obj), name); + error_setg(errp, "timeout can't be zero"); return; } s->compare_timeout = value; @@ -1125,8 +1124,7 @@ static void compare_set_expired_scan_cycle(Object *obj, Visitor *v, return; } if (!value) { - error_setg(errp, "Property '%s.%s' requires a positive value", - object_get_typename(obj), name); + error_setg(errp, "expired_scan_cycle can't be zero"); return; } s->expired_scan_cycle = value; @@ -1153,8 +1151,7 @@ static void set_max_queue_size(Object *obj, Visitor *v, goto out; } if (!value) { - error_setg(&local_err, "Property '%s.%s' requires a positive value", - object_get_typename(obj), name); + error_setg(errp, "queue size can't be zero"); goto out; } max_queue_size = value; From patchwork Fri Oct 30 20:21:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391302 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IyKVRGeA; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDP23bqBz9sSC for ; Sat, 31 Oct 2020 07:26:46 +1100 (AEDT) Received: from localhost ([::1]:57496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYayy-0007AW-Ch for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:26:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYaua-0000uh-Im for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYauX-0007li-AD for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LsYH3HJHZnfDwsrvmD3bm2ho1Ly5Q/kd9xoFoaji3xA=; b=IyKVRGeAFOWSwc3Ceu3phRNmV2lr4zKDOkXvDNMB0CVzUeWHy+NPyqJJk4mBmO/mJrrWu2 H8kb5Gr1KA7VJNV1wEzd/z1BMLRcC6iuRaN/+ALa9RZCR+8XJUI6op9yrTdG1xJW7GROKQ IIVLp4nnan7Su4WXTnJdZGbVCpUc+Po= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-243-zMz1XKBmNh20kWjhN5HDig-1; Fri, 30 Oct 2020 16:22:06 -0400 X-MC-Unique: zMz1XKBmNh20kWjhN5HDig-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8CFDE802B69 for ; Fri, 30 Oct 2020 20:22:05 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40DF555780; Fri, 30 Oct 2020 20:22:05 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 18/20] filter-dump: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:29 -0400 Message-Id: <20201030202131.796967-19-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Wang , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Jason Wang Cc: qemu-devel@nongnu.org --- net/dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/dump.c b/net/dump.c index 7fd448d2e1..16c4fa1588 100644 --- a/net/dump.c +++ b/net/dump.c @@ -197,8 +197,7 @@ static void filter_dump_set_maxlen(Object *obj, Visitor *v, const char *name, return; } if (value == 0) { - error_setg(errp, "Property '%s.%s' doesn't take value '%u'", - object_get_typename(obj), name, value); + error_setg(errp, "maxlen can't be zero"); return; } nfds->maxlen = value; From patchwork Fri Oct 30 20:21:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391318 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NEJLFK2j; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDgR3l5yz9sRR for ; Sat, 31 Oct 2020 07:39:15 +1100 (AEDT) Received: from localhost ([::1]:35572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYbB3-0004ys-Hw for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:39:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYaud-000101-PM for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYaub-0007m4-NB for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UA2p0lb4BLS2VhD6LDFkfpe/k3TZeq6sGxwETdPSMjY=; b=NEJLFK2jrfXTN/GC3YSE34+1KkwEwL6PzRlTFEbJIRKU8+k6IwbqyMhlMTBb3bIOXYODub rGAWKZnPmKMMEv6xWbzTgfgmOsxXsXklc8ITJjLZ+LgHvXeqyzutLtsI18mjlv8Hr3hDV8 cmR8wGcM2gZ1ZieTqZAImEUtovprGA0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-337-5xCFLWBgMCOrciWcngTriw-1; Fri, 30 Oct 2020 16:22:10 -0400 X-MC-Unique: 5xCFLWBgMCOrciWcngTriw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AA9A3802B69 for ; Fri, 30 Oct 2020 20:22:09 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC2005B4A9; Fri, 30 Oct 2020 20:22:06 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 19/20] filter-buffer: Remove unnecessary prefix from error message Date: Fri, 30 Oct 2020 16:21:30 -0400 Message-Id: <20201030202131.796967-20-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Wang , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Jason Wang Cc: qemu-devel@nongnu.org --- net/filter-buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/filter-buffer.c b/net/filter-buffer.c index d8392be53c..2c70dc6c33 100644 --- a/net/filter-buffer.c +++ b/net/filter-buffer.c @@ -175,8 +175,7 @@ static void filter_buffer_set_interval(Object *obj, Visitor *v, return; } if (!value) { - error_setg(errp, "Property '%s.%s' requires a positive value", - object_get_typename(obj), name); + error_setg(errp, "interval can't be zero"); return; } s->interval = value; From patchwork Fri Oct 30 20:21:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1391307 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=E1mUB7hZ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNDRZ5Vk8z9sSG for ; Sat, 31 Oct 2020 07:28:58 +1100 (AEDT) Received: from localhost ([::1]:37870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYb16-0002Fe-M4 for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2020 16:28:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYauk-0001GW-6T for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kYaui-0007mZ-EU for qemu-devel@nongnu.org; Fri, 30 Oct 2020 16:22:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604089339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7QuXmq31Vq2e3TqZloS577E4vGvGcTIHAHZaf5VG7KY=; b=E1mUB7hZ+xtGheNH0pRwh72GaiYq52gM07pImnvbZU3rtDeBzgesyTKOqvJ0QmysE5CLQR oHkpmqf9bJ7gqcBDZJA+d14IbhUMQy07F6nbFjoualJ1Dufxu4sm2IES+MH0CW8cOm6MNE sD9RaP+vTgh8It4cAVR21EguvJNLk2s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-DXlY5l8LMiCZmj08StgpCw-1; Fri, 30 Oct 2020 16:22:17 -0400 X-MC-Unique: DXlY5l8LMiCZmj08StgpCw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0FF8107AFDD for ; Fri, 30 Oct 2020 20:22:16 +0000 (UTC) Received: from localhost (ovpn-114-68.rdu2.redhat.com [10.10.114.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86B8319D61; Fri, 30 Oct 2020 20:22:16 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 20/20] qom: Remove error prefix check at object_property_parse() Date: Fri, 30 Oct 2020 16:21:31 -0400 Message-Id: <20201030202131.796967-21-ehabkost@redhat.com> In-Reply-To: <20201030202131.796967-1-ehabkost@redhat.com> References: <20201030202131.796967-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 16:21:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" All existing "Property '.' ..." error messages were rewritten, we can now add the error message prefix unconditionally. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- qom/object.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/qom/object.c b/qom/object.c index 6fb1657724..4fc536716c 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1640,14 +1640,8 @@ bool object_property_parse(Object *obj, const char *name, bool ok = object_property_set(obj, name, v, errp); if (!ok) { - /* - * Temporary check for existing prefix, until all error reporting - * functions remove their own prefix. - */ - if (!g_str_has_prefix(error_get_pretty(*errp), "Property '")) { - error_prepend(errp, "Property '%s.%s' can't take value '%s': ", - object_get_typename(obj), name, string); - } + error_prepend(errp, "Property '%s.%s' can't take value '%s': ", + object_get_typename(obj), name, string); } visit_free(v); return ok;