<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 20, 2012 at 6:32 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, Dec 20, 2012 at 02:02:27PM +0800, Li Zhang wrote:<br>
> From: Li Zhang <<a href="mailto:zhlcindy@linux.vnet.ibm.com">zhlcindy@linux.vnet.ibm.com</a>><br>
><br>
> QEMU of upstream and PPC64 can support "-device driver,?",<br>
> But the help string is "-device driver,help",<br>
><br>
> This patch is to replace "-device driver,?" with "-device driver,".<br>
><br>
> Signed-off-by: Li Zhang <<a href="mailto:zhlcindy@linux.vnet.ibm.com">zhlcindy@linux.vnet.ibm.com</a>><br>
> ---<br>
>  src/qemu/qemu_capabilities.c |    4 ++--<br>
>  1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c<br>
> index a6ac169..839c966 100644<br>
> --- a/src/qemu/qemu_capabilities.c<br>
> +++ b/src/qemu/qemu_capabilities.c<br>
> @@ -1599,7 +1599,7 @@ qemuCapsExtractDeviceStr(const char *qemu,<br>
>       * in combination with '-device ?'.  Upstream qemu 0.12.x doesn't<br>
>       * understand '-device name,?', and always exits with status 1 for<br>
>       * the simpler '-device ?', so this function is really only useful<br>
> -     * if -help includes "device driver,?".  */<br>
> +     * if -help includes "device driver,".  */<br>
>      cmd = qemuCapsProbeCommand(qemu, caps, hookData);<br>
>      virCommandAddArgList(cmd,<br>
>                           "-device", "?",<br>
> @@ -2186,7 +2186,7 @@ qemuCapsInitHelp(qemuCapsPtr caps, uid_t runUid, gid_t runGid)<br>
>      /* qemuCapsExtractDeviceStr will only set additional caps if qemu<br>
>       * understands the 0.13.0+ notion of "-device driver,".  */<br>
>      if (qemuCapsGet(caps, QEMU_CAPS_DEVICE) &&<br>
> -        strstr(help, "-device driver,?") &&<br>
> +        strstr(help, "-device driver,") &&<br>
>          qemuCapsExtractDeviceStr(caps->binary, caps, &hookData) < 0)<br>
>          goto cleanup;<br>
<br>
</div></div>NACK.<br>
<br>
For any QEMU version where the help text shows 'driver,help' we should<br>
be using QMP to determine capabilities.<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The -help parsing is only for legacy QEMU versions<br></blockquote><div><br></div><div>Got it, thanks. :)<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888"><br>
Daniel<br>
--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div><br></div>Best Regards<div>-Li</div>
</div></div>