From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiMKc-0000QJ-6K for qemu-devel@nongnu.org; Wed, 15 Apr 2015 08:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiMKY-0005Pe-SM for qemu-devel@nongnu.org; Wed, 15 Apr 2015 08:22:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiMKY-0005PN-LM for qemu-devel@nongnu.org; Wed, 15 Apr 2015 08:22:10 -0400 Message-ID: <552E57C5.1000407@redhat.com> Date: Wed, 15 Apr 2015 14:21:25 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1429097404-28027-1-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qmp-commands: fix incorrect uses of ":O" specifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: armbru@redhat.com, Luiz Capitulino On 15/04/2015 14:18, Alberto Garcia wrote: > On Wed 15 Apr 2015 01:30:04 PM CEST, Paolo Bonzini wrote: > >> As far as the QMP parser is concerned, neither the 'O' nor the 'q' >> format specifiers put any constraint on the command. However, there >> are two differences: >> >> 1) from a documentation point of view 'O' says that this command takes >> a dictionary. The dictionary will be converted to QemuOpts in the >> handler to match the corresponding HMP command. > > Is that documentation the comments in monitor.c? It could also be a good > moment to document there 'q' as well. No, I mean what you can learn by parsing the .args_type line. 'foo:O' means there will typically be no argument named foo, and the dictionary will be treated as a series of key/value pairs. 'foo:q' means there will be an argument named foo, which is a JSON object of some kind. Paolo > Otherwise the patch looks good to me, > > Reviewed-by: Alberto Garcia > > Berto >