[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
- [Qemu-devel] [PATCH 01/24] tests: start generic qemu-qmp tests, (continued)
- [Qemu-devel] [PATCH 01/24] tests: start generic qemu-qmp tests, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 02/24] tests: change /0.15/* tests to /qmp/*, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 03/24] qmp: teach qmp_dispatch() to take a pre-filled QDict, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 04/24] qmp: use a return callback for the command reply, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 05/24] qmp: add QmpClient, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 06/24] qmp: add qmp_return_is_cancelled(), Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 07/24] qmp: introduce async command type, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 08/24] qapi: ignore top-level 'id' field,
Marc-André Lureau <=
- [Qemu-devel] [PATCH 10/24] qmp: check that async command have an 'id', Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 09/24] qmp: take 'id' from request, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 11/24] scripts: learn 'async' qapi commands, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 12/24] tests: add dispatch async tests, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 13/24] monitor: add 'async' capability, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 14/24] monitor: add !qmp pre-conditions, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 15/24] monitor: suspend when running async and client has no async, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 16/24] qmp: update qmp-spec about async capability, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 17/24] qtest: add qtest-timeout, Marc-André Lureau, 2016/10/10
- [Qemu-devel] [PATCH 19/24] tests: add tests for async and non-async clients, Marc-André Lureau, 2016/10/10