Patchwork [10/11] QError: New QERR_QMP_INVALID_MODE_COMMAND

login
register
mail settings
Submitter Luiz Capitulino
Date Jan. 21, 2010, 9:09 p.m.
Message ID <1264108180-3666-11-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/43460/
State New
Headers show

Comments

Luiz Capitulino - Jan. 21, 2010, 9:09 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 12dcc8f..52cccc6 100644
--- a/qerror.c
+++ b/qerror.c
@@ -109,6 +109,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Bad QMP input object",
     },
     {
+        .error_fmt = QERR_QMP_INVALID_MODE_COMMAND,
+        .desc      = "The issued command is invalid in this mode",
+    },
+    {
         .error_fmt = QERR_QMP_INVALID_MODE_NAME,
         .desc      = "Mode name %(name) is invalid",
     },
diff --git a/qerror.h b/qerror.h
index 8e16b35..c0deacc 100644
--- a/qerror.h
+++ b/qerror.h
@@ -91,6 +91,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_QMP_BAD_INPUT_OBJECT \
     "{ 'class': 'QMPBadInputObject', 'data': { 'expected': %s } }"
 
+#define QERR_QMP_INVALID_MODE_COMMAND \
+    "{ 'class': 'QMPInvalidModeCommad', 'data': {} }"
+
 #define QERR_QMP_INVALID_MODE_NAME \
     "{ 'class': 'QMPInvalidModeName', 'data': { 'name': %s } }"