[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/1] monitor: Fix QMP ABI breakage around "id"
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH 1/1] monitor: Fix QMP ABI breakage around "id" |
Date: |
Mon, 8 Jun 2015 10:44:30 +0200 |
Commit 65207c5 accidentally dropped a line of code we need along with
a comment that became wrong then. This made QMP reject "id":
{"execute": "system_reset", "id": "1"}
{"error": {"class": "GenericError", "desc": "QMP input object member 'id'
is unexpected"}}
Put the lost line right back, so QMP again accepts and returns "id",
as promised by the ABI:
{"execute": "system_reset", "id": "1"}
{"return": {}, "id": "1"}
Reported-by: Fabio Fantoni <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Don Slutz <address@hidden>
Tested-by: Fabio Fantoni <address@hidden>
Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: Pavel Fedin <address@hidden>
Tested-by: Eric Blake <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
monitor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/monitor.c b/monitor.c
index c7baa91..9afee7b 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4955,6 +4955,8 @@ static QDict *qmp_check_input_obj(QObject *input_obj,
Error **errp)
"arguments", "object");
return NULL;
}
+ } else if (!strcmp(arg_name, "id")) {
+ /* Any string is acceptable as "id", so nothing to check */
} else {
error_set(errp, QERR_QMP_EXTRA_MEMBER, arg_name);
return NULL;
--
1.9.3