From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Luiz Capitulino 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> Subject: [Qemu-devel] [PATCH 07/21] error: New QERR_INVALID_PARAMETER_VALUE List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster 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': {} }" -- 1.7.0.4.297.g6555b1