[libvirt] [PATCH v2 1/3] qemu: Detect support for HMP passthrough

Eric Blake eblake at redhat.com
Mon Mar 21 20:04:43 UTC 2011


On 03/21/2011 06:52 AM, Jiri Denemark wrote:
> ---
> Notes:
>     Version 2:
>     - optionally log that HMP passthrough cannot be used for a given command
> 
>  src/qemu/qemu_monitor.c      |   22 ++++++++++++++++++++--
>  src/qemu/qemu_monitor.h      |    2 ++
>  src/qemu/qemu_monitor_json.c |   42 ++++++++++++++++++++++++++++++++++++++++++
>  src/qemu/qemu_monitor_json.h |    2 ++
>  4 files changed, 66 insertions(+), 2 deletions(-)
> 
>  
>  int
> +qemuMonitorCheckHMP(qemuMonitorPtr mon, const char *cmd)
> +{
> +    if (!mon->json || mon->json_hmp)
> +        return 1;
> +
> +    if (cmd) {
> +        VIR_DEBUG("HMP passthrough not supported by qemu process;"
> +                  " not trying HMP for command %s", cmd);

I had to check the rest of the series to make sure that the message
never leaks out to the user (otherwise, the message would need
translation and VIR_DEBUG would not be right); fortunately, the one
place where you return failure to the user you used a separate
qemuReportError so this message is indeed debug-only (and useful).

ACK

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110321/877faedd/attachment-0001.sig>


More information about the libvir-list mailing list