]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: monitor: Drop fallback to text monitor for 'send-key' command
authorPeter Krempa <pkrempa@redhat.com>
Tue, 22 May 2018 11:13:03 +0000 (13:13 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 23 May 2018 13:43:34 +0000 (15:43 +0200)
The QMP version was added in qemu commit e4c8f004c55d9da3eae3e14 which
is included in v1.3.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor_json.c

index 8769cc5fad39ad8ab232eadf1b7bbd2d813f0aff..9916e78aa4e221bcf43af8af3e5794970e780820 100644 (file)
@@ -4525,14 +4525,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: