From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1sfd-0005qY-1S for qemu-devel@nongnu.org; Mon, 08 Jun 2015 04:44:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1sfa-0002yH-AT for qemu-devel@nongnu.org; Mon, 08 Jun 2015 04:44:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1sfa-0002y7-4R for qemu-devel@nongnu.org; Mon, 08 Jun 2015 04:44:34 -0400 From: Markus Armbruster Date: Mon, 8 Jun 2015 10:44:30 +0200 Message-Id: <1433753070-12632-2-git-send-email-armbru@redhat.com> In-Reply-To: <1433753070-12632-1-git-send-email-armbru@redhat.com> References: <1433753070-12632-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 1/1] monitor: Fix QMP ABI breakage around "id" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, p.fedin@samsung.com, dslutz@verizon.com, fabio.fantoni@m2r.biz 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 Signed-off-by: Markus Armbruster Signed-off-by: Don Slutz Tested-by: Fabio Fantoni Signed-off-by: Wen Congyang Signed-off-by: Pavel Fedin Tested-by: Eric Blake Signed-off-by: Markus Armbruster --- 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