Patchwork [3/9] qerror: rename QERR_QMP_EXTRA_MEMBER

login
register
mail settings
Submitter Luiz Capitulino
Date July 18, 2012, 5:49 p.m.
Message ID <1342633760-351-4-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/171782/
State New
Headers show

Comments

Luiz Capitulino - July 18, 2012, 5:49 p.m.
The error class name is QMPExtraInputObjectMember, not QMPExtraMember.

Rename the QERR_QMP_EXTRA_MEMBER macro to QERR_QMP_EXTRA_INPUT_OBJECT_MEMBER
to reflect that, so that future error macro generation generates the
expected macro name.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c                | 2 +-
 qapi/qmp-dispatch.c      | 2 +-
 qapi/qmp-input-visitor.c | 2 +-
 qerror.c                 | 2 +-
 qerror.h                 | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/monitor.c b/monitor.c
index 188c03d..8427c6c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4434,7 +4434,7 @@  static QDict *qmp_check_input_obj(QObject *input_obj)
         } else if (!strcmp(arg_name, "id")) {
             /* FIXME: check duplicated IDs for async commands */
         } else {
-            qerror_report(QERR_QMP_EXTRA_MEMBER, arg_name);
+            qerror_report(QERR_QMP_EXTRA_INPUT_OBJECT_MEMBER, arg_name);
             return NULL;
         }
     }
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 122c1a2..29d6f30 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -47,7 +47,7 @@  static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp)
             }
             has_exec_key = true;
         } else if (strcmp(arg_name, "arguments")) {
-            error_set(errp, QERR_QMP_EXTRA_MEMBER, arg_name);
+            error_set(errp, QERR_QMP_EXTRA_INPUT_OBJECT_MEMBER, arg_name);
             return NULL;
         }
     }
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c
index 107d8d3..a59d4f6 100644
--- a/qapi/qmp-input-visitor.c
+++ b/qapi/qmp-input-visitor.c
@@ -104,7 +104,7 @@  static void qmp_input_pop(QmpInputVisitor *qiv, Error **errp)
             if (g_hash_table_size(top_ht)) {
                 const char *key;
                 g_hash_table_find(top_ht, always_true, &key);
-                error_set(errp, QERR_QMP_EXTRA_MEMBER, key);
+                error_set(errp, QERR_QMP_EXTRA_INPUT_OBJECT_MEMBER, key);
             }
             g_hash_table_unref(top_ht);
         }
diff --git a/qerror.c b/qerror.c
index a9d771b..132ab2d 100644
--- a/qerror.c
+++ b/qerror.c
@@ -271,7 +271,7 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "QMP input object member '%(member)' expects '%(expected)'",
     },
     {
-        .error_fmt = QERR_QMP_EXTRA_MEMBER,
+        .error_fmt = QERR_QMP_EXTRA_INPUT_OBJECT_MEMBER,
         .desc      = "QMP input object member '%(member)' is unexpected",
     },
     {
diff --git a/qerror.h b/qerror.h
index 69d417d..27ce395 100644
--- a/qerror.h
+++ b/qerror.h
@@ -224,7 +224,7 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_QMP_BAD_INPUT_OBJECT_MEMBER \
     "{ 'class': 'QMPBadInputObjectMember', 'data': { 'member': %s, 'expected': %s } }"
 
-#define QERR_QMP_EXTRA_MEMBER \
+#define QERR_QMP_EXTRA_INPUT_OBJECT_MEMBER \
     "{ 'class': 'QMPExtraInputObjectMember', 'data': { 'member': %s } }"
 
 #define QERR_RESET_REQUIRED \