From patchwork Tue Mar 27 12:20:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 148932 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 04382B6EF1 for ; Tue, 27 Mar 2012 23:22:28 +1100 (EST) Received: from localhost ([::1]:38178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCVPt-0004B3-PM for incoming@patchwork.ozlabs.org; Tue, 27 Mar 2012 08:22:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCVOh-0001WQ-BN for qemu-devel@nongnu.org; Tue, 27 Mar 2012 08:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCVOa-0000Lx-Um for qemu-devel@nongnu.org; Tue, 27 Mar 2012 08:21:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCVOa-0000Lm-Na for qemu-devel@nongnu.org; Tue, 27 Mar 2012 08:21:04 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2RCL3so032710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Mar 2012 08:21:03 -0400 Received: from localhost (ovpn-113-71.phx2.redhat.com [10.3.113.71]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2RCL2eJ006761; Tue, 27 Mar 2012 08:21:02 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Tue, 27 Mar 2012 09:20:49 -0300 Message-Id: <1332850851-4059-12-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1332850851-4059-1-git-send-email-lcapitulino@redhat.com> References: <1332850851-4059-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 11/13] qmp: add and use q type specifier X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Paolo Bonzini "O" is being used by the transaction and qom-set commands to mean "any QObject", but it really means "do not validate the argument list". Add a new specifier with the correct meaning. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- monitor.c | 3 +++ qmp-commands.hx | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 2ff1e0b..8946a10 100644 --- a/monitor.c +++ b/monitor.c @@ -4157,6 +4157,9 @@ static int check_client_args_type(const QDict *client_args, case 'O': assert(flags & QMP_ACCEPT_UNKNOWNS); break; + case 'q': + /* Any QObject can be passed. */ + break; case '/': case '.': /* diff --git a/qmp-commands.hx b/qmp-commands.hx index c626ba8..9447871 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -708,7 +708,7 @@ EQMP }, { .name = "transaction", - .args_type = "actions:O", + .args_type = "actions:q", .mhandler.cmd_new = qmp_marshal_input_transaction, }, @@ -2125,7 +2125,7 @@ EQMP { .name = "qom-set", - .args_type = "path:s,property:s,opts:O", + .args_type = "path:s,property:s,value:q", .mhandler.cmd_new = qmp_qom_set, },