From nobody Mon Feb 9 13:59:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1634813136; cv=none; d=zohomail.com; s=zohoarc; b=eNGgVxbR5w4wj5RYDKYT9pzeour1lYts8NDB5Jo37JR/zRNk/QvjFzTNqxoSThtdTMUL+xLO5G77SzWN2Vkwt0MR/uNTzfs06T9N6W0/e0OLy+lDzX/0ycrWIX4D/Pohi/eqb9bcl46OifFbfsrfRQ5oT/5Et+tvxX2AOniuFbw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634813136; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=h87fEbQ6tK0IrWd1UQMvacycUoNO53/D0M0k2Y+53jQ=; b=ViYDwnoCPFI5vsPePuTEgB245glYpVeuoBHIRQ1497AGER40TbtkyvM630VIgs6RA1qTpZr4xDW0U4nt/FYZizF0Klkx5+uqBMZGcu7zQklKY+FnxYfKzrgx+iYsvF+75KpKwqwmqSqFdAqnLnUhxapk4pv5J3vFzwhpdMFkq0o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1634813136756610.6899147593463; Thu, 21 Oct 2021 03:45:36 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-EJIWvZE_NaC7Wh1plxZsAA-1; Thu, 21 Oct 2021 06:45:32 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E4D8880A5E0; Thu, 21 Oct 2021 10:45:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C38A15FC22; Thu, 21 Oct 2021 10:45:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 900634EA29; Thu, 21 Oct 2021 10:45:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19LAjN0b008906 for ; Thu, 21 Oct 2021 06:45:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 30B4B196AE; Thu, 21 Oct 2021 10:45:23 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4C5E19D9F for ; Thu, 21 Oct 2021 10:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634813135; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=h87fEbQ6tK0IrWd1UQMvacycUoNO53/D0M0k2Y+53jQ=; b=cyUZZIkrrEGKNLX6m/ZCOjZ7cAJB3h9/dofIYlxp3YAsWtQ0KAHCUGx2uAMXza1eMuyNPm 4LnjX+FENzop3KESPZFbBDoP3I+Ad+oEBBthimv78/yCxmGGUqBta7H80ED8D+U+FwEjvu iV+Dp8wDA0aDkmFF5sl4iSX0iP7ERuo= X-MC-Unique: EJIWvZE_NaC7Wh1plxZsAA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 6/6] qemuMonitorJSONGetMigrationCapabilities: Don't return early on CommandNotFound Date: Thu, 21 Oct 2021 12:45:15 +0200 Message-Id: <38357430ec22b965aa11b159eed3688f061ab84a.1634813020.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1634813137547100001 Content-Type: text/plain; charset="utf-8" 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 --- 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; =20 - if (qemuMonitorJSONHasError(reply, "CommandNotFound")) - return 0; - if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0) return -1; =20 --=20 2.32.0