@@ -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)",
},
@@ -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 } }"
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(-)