Kevin Wolf <kw...@redhat.com> writes:

> Am 27.02.2017 um 12:20 hat Markus Armbruster geschrieben:
>> Incorrect option
>> 
>>     -blockdev node-name=foo,driver=file,filename=foo.img,aio.unmap
>> 
>> is rejected with "Invalid parameter type for 'aio', expected: string".
>> To make sense of this, you almost have to translate it into the
>> equivalent QMP command
>> 
>>     { "execute": "blockdev-add", "arguments": { "node-name": "foo", 
>> "driver": "file", "filename": "foo.img", "aio": { "unmap": true } } }
>> 
>> Improve the error message to "Parameters 'aio.*' are unexpected".
>
> In fact, what I get (after fixing the previous review comments that
> would make it crash) is "Expected '=' after parameter 'aio.unmap'". Only
> if I add a value, I get the newly added message.

Fallout from ditching implied value sugar some time after this commit
message was written.  Will fix.

> Doesn't make the patch less correct, though.
>
>> Take care not to confuse the case "unexpected nested parameters"
>> (i.e. the object is a QDict or QList) with the case "non-string scalar
>> parameter".  The latter is a misuse of the visitor, and should perhaps
>> be an assertion.  Note that test-qobject-input-visitor exercises this
>> misuse in test_visitor_in_int_keyval(), test_visitor_in_bool_keyval()
>> and test_visitor_in_number_keyval().
>> 
>> Signed-off-by: Markus Armbruster <arm...@redhat.com>
>
> Reviewed-by: Kevin Wolf <kw...@redhat.com>

Thanks!

Reply via email to