[libvirt] [PATCH 2/8] qemu: monitor: Drop fallback to text monitor for 'send-key' command

Peter Krempa posted 8 patches 6 years, 11 months ago
[libvirt] [PATCH 2/8] qemu: monitor: Drop fallback to text monitor for 'send-key' command
Posted by Peter Krempa 6 years, 11 months ago
The QMP version was added in qemu commit e4c8f004c55d9da3eae3e14 which
is included in v1.3.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_monitor_json.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 530a5b9de2..7ddecbc907 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -4458,14 +4458,8 @@ int qemuMonitorJSONSendKey(qemuMonitorPtr mon,
     if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
         goto cleanup;

-    if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
-        VIR_DEBUG("send-key command not found, trying HMP");
-        if (qemuMonitorTextSendKey(mon, holdtime, keycodes, nkeycodes) < 0)
-            goto cleanup;
-    } else {
-        if (qemuMonitorJSONCheckError(cmd, reply) < 0)
-            goto cleanup;
-    }
+    if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+        goto cleanup;

     ret = 0;
  cleanup:
-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/8] qemu: monitor: Drop fallback to text monitor for 'send-key' command
Posted by Ján Tomko 6 years, 11 months ago
On Tue, May 22, 2018 at 02:35:42PM +0200, Peter Krempa wrote:
>The QMP version was added in qemu commit e4c8f004c55d9da3eae3e14 which
>is included in v1.3.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_monitor_json.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list