Patchwork [5/6] qemu,qmp: QError: New QERR_UNKNOWN_KEY

login
register
mail settings
Submitter Lai Jiangshan
Date Dec. 9, 2010, 6:59 a.m.
Message ID <4D007E58.5010104@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/74927/
State New
Headers show

Comments

Lai Jiangshan - Dec. 9, 2010, 6:59 a.m.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---

Patch

diff --git a/qerror.c b/qerror.c
index fd66d2a..07b4cfc 100644
--- a/qerror.c
+++ b/qerror.c
@@ -205,6 +205,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "An undefined error has ocurred",
     },
     {
+        .error_fmt = QERR_UNKNOWN_KEY,
+        .desc      = "Unknown key: '%(name)'",
+    },
+    {
         .error_fmt = QERR_VNC_SERVER_FAILED,
         .desc      = "Could not start VNC server on %(target)",
     },
diff --git a/qerror.h b/qerror.h
index 7f56f12..cf3ab8f 100644
--- a/qerror.h
+++ b/qerror.h
@@ -168,6 +168,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_UNDEFINED_ERROR \
     "{ 'class': 'UndefinedError', 'data': {} }"
 
+#define QERR_UNKNOWN_KEY \
+    "{ 'class': 'UnknownKey', 'data': { 'name': %s } }"
+
 #define QERR_VNC_SERVER_FAILED \
     "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"