Re: [PATCH v2 2/3] qemu: Only use HMP passthrough if it is supported

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

 



On 03/21/2011 06:52 AM, Jiri Denemark wrote:
> Avoids calling text monitor methods when it is know they will not
> succeed and also results in nicer error messages.
> ---
> Notes:
>     Version 2:
>     - new patch
> 

> -    if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
> +    if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
> +        qemuMonitorCheckHMP(mon, "cpu_set")) {
>          VIR_DEBUG0("cpu_set command not found, trying HMP");

So either we get a debug message about trying HMP, or we get a debug
message about skipping HMP.  Looks nice.

> @@ -2466,6 +2470,12 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
>      int ret = -1;
>  
>      if (hmp) {
> +        if (!qemuMonitorCheckHMP(mon, NULL)) {
> +            qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> +                            _("HMP passthrough is not supported by qemu"
> +                              " process; only QMP commands can be used"));

And this is the one place where it becomes a user-visible effect.

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]