[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qmp-commands: fix incorrect uses of ":O" specif
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] qmp-commands: fix incorrect uses of ":O" specifier |
Date: |
Wed, 15 Apr 2015 14:21:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
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 <address@hidden>
>
> Berto
>