Patchwork [11/13] QError: Introduce QERR_QMP_UNEXPECTED_INPUT_OBJECT_MEMBER

login
register
mail settings
Submitter Luiz Capitulino
Date June 22, 2010, 5:40 p.m.
Message ID <1277228451-7741-12-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/56550/
State New
Headers show

Comments

Luiz Capitulino - June 22, 2010, 5:40 p.m.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/qerror.c b/qerror.c
index 44d0bf8..8a10557 100644
--- a/qerror.c
+++ b/qerror.c
@@ -177,6 +177,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "QMP input object member '%(member)' expects '%(expected)'",
     },
     {
+        .error_fmt = QERR_QMP_UNEXPECTED_INPUT_OBJECT_MEMBER,
+        .desc      = "QMP input object member '%(member)' is unexpected",
+    },
+    {
         .error_fmt = QERR_SET_PASSWD_FAILED,
         .desc      = "Could not set password",
     },
diff --git a/qerror.h b/qerror.h
index 77ae574..ef59430 100644
--- a/qerror.h
+++ b/qerror.h
@@ -148,6 +148,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_QMP_BAD_INPUT_OBJECT_MEMBER \
     "{ 'class': 'QMPBadInputObjectMember', 'data': { 'member': %s, 'expected': %s } }"
 
+#define QERR_QMP_UNEXPECTED_INPUT_OBJECT_MEMBER \
+    "{ 'class': 'QMPUnexpectedInputObjectMember', 'data': { 'member': %s } }"
+
 #define QERR_SET_PASSWD_FAILED \
     "{ 'class': 'SetPasswdFailed', 'data': {} }"