diff mbox

[1/2,V9] qemu,qmp: QError: New QERR_UNSUPPORTED

Message ID 4DB8E07C.7000407@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lai Jiangshan April 28, 2011, 3:35 a.m. UTC
New QERR_UNSUPPORTED for unsupported commands or requests.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/qerror.c b/qerror.c
index 4855604..f905887 100644
--- a/qerror.c
+++ b/qerror.c
@@ -206,6 +206,10 @@  static const QErrorStringTable qerror_table[] = {
                      "supported by this qemu version: %(feature)",
     },
     {
+        .error_fmt = QERR_UNSUPPORTED,
+        .desc      = "Unsupported: %(detail)",
+    },
+    {
         .error_fmt = QERR_VNC_SERVER_FAILED,
         .desc      = "Could not start VNC server on %(target)",
     },
diff --git a/qerror.h b/qerror.h
index df61d2c..b3455ce 100644
--- a/qerror.h
+++ b/qerror.h
@@ -168,6 +168,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_UNKNOWN_BLOCK_FORMAT_FEATURE \
     "{ 'class': 'UnknownBlockFormatFeature', 'data': { 'device': %s, 'format': %s, 'feature': %s } }"
 
+#define QERR_UNSUPPORTED \
+    "{ 'class': 'Unsupported', 'data': { 'detail': %s } }"
+
 #define QERR_VNC_SERVER_FAILED \
     "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"