[PATCH v2 6/6] qemuMonitorJSONGetMigrationCapabilities: Don't return early on CommandNotFound

Michal Privoznik mprivozn at redhat.com
Thu Oct 21 10:45:15 UTC 2021


The qemuMonitorJSONGetMigrationCapabilities() command executes
'query-migrate-capabilities' command and returns early if QEMU
doesn't know the command. Well, the command was introduced in
QEMU release 1.2 (specifically in commit v1.2.0-rc0~29^2~11) 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 at redhat.com>
---
 src/qemu/qemu_monitor_json.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 586b30763b..a7a980fccd 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -6518,9 +6518,6 @@ qemuMonitorJSONGetMigrationCapabilities(qemuMonitor *mon,
     if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
         return -1;
 
-    if (qemuMonitorJSONHasError(reply, "CommandNotFound"))
-        return 0;
-
     if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
         return -1;
 
-- 
2.32.0




More information about the libvir-list mailing list