[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Support 'help' as a synonym for '?' in command
Re: [Qemu-devel] [PATCH] Support 'help' as a synonym for '?' in command line options
Mon, 09 Jul 2012 06:19:21 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
On 07/09/2012 06:10 AM, Peter Maydell wrote:
> On 9 July 2012 13:07, Eric Blake <address@hidden> 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 address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature