]> Git Repo - qemu.git/commit
qemu-io: Use purely string blockdev options
authorMax Reitz <[email protected]>
Wed, 2 May 2018 20:20:49 +0000 (22:20 +0200)
committerMax Reitz <[email protected]>
Tue, 15 May 2018 14:15:21 +0000 (16:15 +0200)
commit2a01c01f9ecb43af4c0a85fe6adc429ffc9c31b5
tree2aaca0e99235fb30ed1bfc1025895e747bf60bcc
parentc1e3489dfaa01d215e37b1412759b856c33d44ed
qemu-io: Use purely string blockdev options

Currently, qemu-io only uses string-valued blockdev options (as all are
converted directly from QemuOpts) -- with one exception: -U adds the
force-share option as a boolean.  This in itself is already a bit
questionable, but a real issue is that it also assumes the value already
existing in the options QDict would be a boolean, which is wrong.

That has the following effect:

$ ./qemu-io -r -U --image-opts \
    driver=file,filename=/dev/null,force-share=off
[1]    15200 segmentation fault (core dumped)  ./qemu-io -r -U
--image-opts driver=file,filename=/dev/null,force-share=off

Since @opts is converted from QemuOpts, the value must be a string, and
we have to compare it as such.  Consequently, it makes sense to also set
it as a string instead of a boolean.

Cc: [email protected]
Signed-off-by: Max Reitz <[email protected]>
Message-id: 20180502202051[email protected]
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
qemu-io.c
This page took 0.025515 seconds and 4 git commands to generate.