]> Git Repo - qemu.git/commitdiff
monitor: Fix QMP ABI breakage around "id"
authorMarkus Armbruster <[email protected]>
Mon, 8 Jun 2015 08:44:30 +0000 (10:44 +0200)
committerPeter Maydell <[email protected]>
Mon, 8 Jun 2015 11:12:11 +0000 (12:12 +0100)
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 <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Don Slutz <[email protected]>
Tested-by: Fabio Fantoni <[email protected]>
Signed-off-by: Wen Congyang <[email protected]>
Signed-off-by: Pavel Fedin <[email protected]>
Tested-by: Eric Blake <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-id: 1433753070[email protected]
Signed-off-by: Peter Maydell <[email protected]>
monitor.c

index c7baa9198c141d07deaa7e0bbc40621fe9c485fc..9afee7b946e1163400acdeba35814eaa1684db48 100644 (file)
--- 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;
             }
                           "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;
         } else {
             error_set(errp, QERR_QMP_EXTRA_MEMBER, arg_name);
             return NULL;
This page took 0.037575 seconds and 4 git commands to generate.