Re: [PATCH 6/6] Use help string "-device driver, " when getting additional caps.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, Dec 20, 2012 at 6:32 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
On Thu, Dec 20, 2012 at 02:02:27PM +0800, Li Zhang wrote:
> From: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>
>
> QEMU of upstream and PPC64 can support "-device driver,?",
> But the help string is "-device driver,help",
>
> This patch is to replace "-device driver,?" with "-device driver,".
>
> Signed-off-by: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_capabilities.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index a6ac169..839c966 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -1599,7 +1599,7 @@ qemuCapsExtractDeviceStr(const char *qemu,
>       * in combination with '-device ?'.  Upstream qemu 0.12.x doesn't
>       * understand '-device name,?', and always exits with status 1 for
>       * the simpler '-device ?', so this function is really only useful
> -     * if -help includes "device driver,?".  */
> +     * if -help includes "device driver,".  */
>      cmd = qemuCapsProbeCommand(qemu, caps, hookData);
>      virCommandAddArgList(cmd,
>                           "-device", "?",
> @@ -2186,7 +2186,7 @@ qemuCapsInitHelp(qemuCapsPtr caps, uid_t runUid, gid_t runGid)
>      /* qemuCapsExtractDeviceStr will only set additional caps if qemu
>       * understands the 0.13.0+ notion of "-device driver,".  */
>      if (qemuCapsGet(caps, QEMU_CAPS_DEVICE) &&
> -        strstr(help, "-device driver,?") &&
> +        strstr(help, "-device driver,") &&
>          qemuCapsExtractDeviceStr(caps->binary, caps, &hookData) < 0)
>          goto cleanup;

NACK.

For any QEMU version where the help text shows 'driver,help' we should
be using QMP to determine capabilities.

The -help parsing is only for legacy QEMU versions

Got it, thanks. :)
 

Daniel
--
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



--

Best Regards
-Li
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]