Skip to contentSkip to conversation

qemu,qmp: QError: New QERR_UNKNOWN_KEY

PATCH Superseded Lai Jiangshan 1 participant 1 message Dec 9, 2010 KVM

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 qemu,qmp: QError: New QERR_UNKNOWN_KEY

---

qerror.c +4 -0
index fd66d2a..07b4cfc 100644
@@ -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)",
     },
qerror.h +3 -0
index 7f56f12..cf3ab8f 100644
@@ -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 } }"