From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-stable@nongnu.org, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] qemu-io: Use purely string blockdev options
Date: Wed, 2 May 2018 16:57:41 -0500 [thread overview]
Message-ID: <b81d302d-f419-7e20-d6c5-cd11b878e7ff@redhat.com> (raw)
In-Reply-To: <20180502202051.15493-2-mreitz@redhat.com>
On 05/02/2018 03:20 PM, Max Reitz wrote:
> 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: qemu-stable@nongnu.org
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> qemu-io.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
The curse of poor typing in QemuOpts keeps on giving ;)
Adding Markus, so he's aware of yet another wart that his command-line
cleanups may need to visit.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-05-02 21:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 20:20 [Qemu-devel] [PATCH 0/3] qemu-io/img: Fix -U/force-share conflict testing Max Reitz
2018-05-02 20:20 ` [Qemu-devel] [PATCH 1/3] qemu-io: Use purely string blockdev options Max Reitz
2018-05-02 21:57 ` Eric Blake [this message]
2018-05-02 20:20 ` [Qemu-devel] [PATCH 2/3] qemu-img: Use only string options in img_open_opts Max Reitz
2018-05-02 22:00 ` Eric Blake
2018-05-02 22:02 ` Max Reitz
2018-05-02 20:20 ` [Qemu-devel] [PATCH 3/3] iotests: Add test for -U/force-share conflicts Max Reitz
2018-05-02 22:02 ` Eric Blake
2018-05-09 21:57 ` [Qemu-devel] [PATCH 0/3] qemu-io/img: Fix -U/force-share conflict testing Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b81d302d-f419-7e20-d6c5-cd11b878e7ff@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).