qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 08/24] qapi: ignore top-level 'id' field


From: Marc-André Lureau
Subject: [Qemu-devel] [PATCH 08/24] qapi: ignore top-level 'id' field
Date: Mon, 10 Oct 2016 13:22:45 +0400

The following patch copies the 'id' to the reply, without touching the
original request (which should eventually be const later) so it must
pass the check function without error.

'id' is documented as part of qmp-spec, it is valid at top-level entry.

Signed-off-by: Marc-André Lureau <address@hidden>
---
 qapi/qmp-dispatch.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 7e1ef54..1fedc97 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -48,6 +48,8 @@ static QDict *qmp_dispatch_check_obj(const QObject *request, 
Error **errp)
                 return NULL;
             }
             has_exec_key = true;
+        } else if (!strcmp(arg_name, "id")) {
+            /* top-level 'id' is accepted */
         } else if (strcmp(arg_name, "arguments")) {
             error_setg(errp, QERR_QMP_EXTRA_MEMBER, arg_name);
             return NULL;
-- 
2.10.0




reply via email to

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