From patchwork Thu Mar 18 16:33:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 48061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5E7C0B7D0C for ; Fri, 19 Mar 2010 03:55:27 +1100 (EST) Received: from localhost ([127.0.0.1]:44771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsIve-0004CP-LQ for incoming@patchwork.ozlabs.org; Thu, 18 Mar 2010 12:50:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsIf3-0008P5-BE for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:29 -0400 Received: from [199.232.76.173] (port=40349 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsIf2-0008NV-64 for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:28 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NsIew-0005M7-OM for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:27 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:56556) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NsIew-0005Li-4c for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:22 -0400 Received: from blackfin.pond.sub.org (pD9E3ACC8.dip.t-dialin.net [217.227.172.200]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 381BE276D90 for ; Thu, 18 Mar 2010 17:33:19 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id B89D1CB; Thu, 18 Mar 2010 17:33:16 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 18 Mar 2010 17:33:11 +0100 Message-Id: <1268929996-28763-5-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1268929996-28763-1-git-send-email-armbru@redhat.com> References: <1268929996-28763-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH 04/11] error: New QERR_INVALID_PARAMETER_VALUE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 9fb817e..97e8d4a 100644 --- a/qerror.c +++ b/qerror.c @@ -121,6 +121,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Invalid parameter type, expected: %(expected)", }, { + .error_fmt = QERR_INVALID_PARAMETER_VALUE, + .desc = "Parameter '%(name)' expects %(expected)", + }, + { .error_fmt = QERR_INVALID_PASSWORD, .desc = "Password incorrect", }, diff --git a/qerror.h b/qerror.h index 870cdc3..5625d54 100644 --- a/qerror.h +++ b/qerror.h @@ -106,6 +106,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_INVALID_PARAMETER_TYPE \ "{ 'class': 'InvalidParameterType', 'data': { 'name': %s,'expected': %s } }" +#define QERR_INVALID_PARAMETER_VALUE \ + "{ 'class': 'InvalidParameterValue', 'data': { 'name': %s, 'expected': %s } }" + #define QERR_INVALID_PASSWORD \ "{ 'class': 'InvalidPassword', 'data': {} }"