qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 1/3 V8] QError: Introduce QERR_UNSUPPORTED


From: Lai Jiangshan
Subject: [Qemu-devel] [RFC PATCH 1/3 V8] QError: Introduce QERR_UNSUPPORTED
Date: Wed, 20 Apr 2011 14:19:35 +0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc14 Thunderbird/3.1.4


New QERR_UNSUPPORTED for unsupported commands or requests.

Signed-off-by: Lai Jiangshan <address@hidden>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/qerror.c b/qerror.c
index c76257f..bafe520 100644
--- a/qerror.c
+++ b/qerror.c
@@ -213,6 +213,10 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Cannot set union '%(name)' of type '%(type)' to value 
'%(new-value)' because it already is set to value '%(value)'"
     },
     {
+        .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 1f98be1..01ec87d 100644
--- a/qerror.h
+++ b/qerror.h
@@ -193,6 +193,9 @@ void qerror_set_desc(QError *qerr, const char *fmt);
 #define QERR_UNION_MULTIPLE_ENTRIES \
     "{ 'class': 'UnionMultipleEntries', 'data': { 'name': %s, 'type': %s, 
'value': %s, 'new-value': %s } }"
 
+#define QERR_UNSUPPORTED \
+    "{ 'class': 'Unsupported', 'data': { 'detail': %s } }"
+
 #define QERR_VNC_SERVER_FAILED \
     "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"
 
-- 
1.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]