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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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