]> Git Repo - qemu.git/commit
block: Fix -drive for certain non-string scalars
authorMarkus Armbruster <[email protected]>
Thu, 14 Jun 2018 19:14:31 +0000 (21:14 +0200)
committerKevin Wolf <[email protected]>
Fri, 15 Jun 2018 12:49:44 +0000 (14:49 +0200)
commit374c52467a38c2e811f6c0db4edc9ea7d5f34341
tree54c2eeb729406d746c73256634fcffcffc0b83b5
parente5af0da1dcbfb1a4694150f9954554fb6df88819
block: Fix -drive for certain non-string scalars

The previous commit fixed -blockdev breakage due to misuse of the
qobject input visitor's keyval flavor in bdrv_file_open().  The commit
message explain why using the plain flavor would be just as wrong; it
would break -drive.  Turns out we break it in three places:
nbd_open(), sd_open() and ssh_file_open().  They are even marked
FIXME.  Example breakage:

    $ qemu-system-x86 -drive node-name=n1,driver=nbd,server.type=inet,server.host=localhost,server.port=1234,server.numeric=off
    qemu-system-x86: -drive node-name=n1,driver=nbd,server.type=inet,server.host=localhost,server.port=1234,server.numeric=off: Invalid parameter type for 'numeric', expected: boolean

Fix it the same way: replace qdict_crumple() by
qdict_crumple_for_keyval_qiv(), and switch from plain to the keyval
flavor.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/nbd.c
block/sheepdog.c
block/ssh.c
This page took 0.025357 seconds and 4 git commands to generate.