monitor: Fix QMP ABI breakage around "id"
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 <fabio.fantoni@m2r.biz> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Don Slutz <dslutz@verizon.com> Tested-by: Fabio Fantoni <fabio.fantoni@m2r.biz> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Tested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1433753070-12632-2-git-send-email-armbru@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
00967f4e0b
commit
779cec4d20
@ -4955,6 +4955,8 @@ static QDict *qmp_check_input_obj(QObject *input_obj, Error **errp)
|
|||||||
"arguments", "object");
|
"arguments", "object");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
} else if (!strcmp(arg_name, "id")) {
|
||||||
|
/* Any string is acceptable as "id", so nothing to check */
|
||||||
} else {
|
} else {
|
||||||
error_set(errp, QERR_QMP_EXTRA_MEMBER, arg_name);
|
error_set(errp, QERR_QMP_EXTRA_MEMBER, arg_name);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user