aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-02-28 22:27:08 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-03-07 16:07:47 +0100
commit31478f26ab4ed82d35b763bbf259810d0c8b44e1 (patch)
treed645d24279265bb083447941218b16e234348908 /docs
parent42e5f39378c6e7a0ada563779bbb6f470f7c03ff (diff)
qapi: Improve how keyval input visitor reports unexpected dicts
Incorrect option -blockdev node-name=foo,driver=file,filename=foo.img,aio.unmap=on 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". 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 <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <1488317230-26248-23-git-send-email-armbru@redhat.com>
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions