From patchwork Mon Apr 5 20:33:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 49436 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 5ABC5B7C48 for ; Tue, 6 Apr 2010 06:37:33 +1000 (EST) Received: from localhost ([127.0.0.1]:44040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nyt1h-0001XN-9O for incoming@patchwork.ozlabs.org; Mon, 05 Apr 2010 16:36:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nyt0b-0001X7-5R for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:57 -0400 Received: from [140.186.70.92] (port=49459 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nyt0T-0001WS-UE for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nyt0A-0001bo-5e for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60254) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nyt09-0001bi-Sl for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:30 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o35KYSTR024409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Apr 2010 16:34:28 -0400 Received: from localhost (vpn-8-191.rdu.redhat.com [10.11.8.191]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o35KYRqL000928; Mon, 5 Apr 2010 16:34:27 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Mon, 5 Apr 2010 17:33:48 -0300 Message-Id: <1270499642-31543-8-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1270499642-31543-1-git-send-email-lcapitulino@redhat.com> References: <1270499642-31543-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster Subject: [Qemu-devel] [PATCH 07/21] 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 From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- 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': {} }"