All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Michael Tokarev <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] Support 'help' as a synonym for '?' in command line options
Date: Mon, 09 Jul 2012 06:19:21 -0600	[thread overview]
Message-ID: <4FFACC49.90102@redhat.com> (raw)
In-Reply-To: <CAFEAcA8L0BGPVYu2vCOFXyynX4Xkn5nYv5zN+Lgm5WSGv5-RWg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]

On 07/09/2012 06:10 AM, Peter Maydell wrote:
> On 9 July 2012 13:07, Eric Blake <eblake@redhat.com> wrote:
>> That is, we are filtering based on the explicit presence of a literal
>> '?' in the help output to determine whether we can further filter based
>> on '-device device,?' queries without confusing qemu or libvirt;
>> changing the 'help' output means that old libvirt with new qemu won't
>> run the extra queries (as if it had been targeting qemu 0.12.x), even
>> though the older spelling of the query would still work.
>>
>> If that is not a concern (that is, if you are willing to state that use
>> of newer qemu is intended to be coupled with newer libvirt that has been
>> taught to use 'help' instead of '?'), then this patch is probably fine.
> 
> My personal position would be that people who parse -help
> output deserve to get bitten, but I don't get to make that
> call :-)

Obviously, newer libvirt can just proceed to try '-device device,help'
rather than attempting to parse -h output in the first place (that is,
making this change will not cause undue grief to libvirt 0.10.0, because
it's a very short patch to teach libvirt.git to parse this new scheme,
even without relying on -h output).  That is, my concern is not about
what future libvirt will be fixed to do, but about the existing
interaction of old libvirt with qemu (libvirt 0.9.13 + qemu 1.2 would
fail to take full advantage of the qemu 1.2 features because of the
change in the -h output that libvirt 0.9.13 was hard-coded to expect).

And yes, I agree that libvirt has been bitten more than once because it
tries to parse unstable -h output, but that is only because qemu has
never provided anything more stable and more machine-parseable than -h
output, even though the topic has come up several times in the past.
For example, we still don't have a way to run 'query-commands' to see
what the QMP monitor will support without first creating a dummy guest.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

  reply	other threads:[~2012-07-09 12:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 11:52 [Qemu-devel] [PATCH] Support 'help' as a synonym for '?' in command line options Peter Maydell
2012-07-09 12:07 ` Eric Blake
2012-07-09 12:10   ` Peter Maydell
2012-07-09 12:19     ` Eric Blake [this message]
2012-07-09 12:59       ` Markus Armbruster
2012-07-09 12:40   ` Daniel P. Berrange
2012-07-25 14:53 ` Peter Maydell

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=4FFACC49.90102@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=mjt@tls.msk.ru \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.