]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuMonitorJSONGetKVMState: Don't return early on CommandNotFound
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Oct 2021 08:46:09 +0000 (10:46 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 22 Oct 2021 05:00:44 +0000 (07:00 +0200)
The qemuMonitorJSONGetKVMState() command executes 'query-kvm'
command and returns early if QEMU doesn't know the command. Well,
the command was introduced in QEMU release 0.14 and since the
minimum required version is 2.11.0 we can be sure that command
will always exist.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor_json.c

index df3e14a1531ad23b3fce94d8ace8ba01c6623e9f..70e3c70441f1aa11de64ab7e9cb6907bb8c2197d 100644 (file)
@@ -6020,11 +6020,6 @@ int qemuMonitorJSONGetKVMState(qemuMonitor *mon,
     if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
         goto cleanup;
 
-    if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
-        ret = 0;
-        goto cleanup;
-    }
-
     if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
         goto cleanup;