From nobody Mon Feb 9 01:22:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1634813142; cv=none; d=zohomail.com; s=zohoarc; b=ZVeul027pBVza6PHJLmgUjLJncsv7JxAytFlptq3Qm2si4jU4jPcyqEw7KEL24JI7beQUo23LzJsA2HhrS34txWJIuOe1f/2vhn7/pz4S5oqPwBS900yilqz5tFY4yMjajUQrYLDMrNaHRleu/N6++bMHk95Y56cU9/Gc3GuBXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634813142; 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=AnH8HN9BJ4y9FeSDyuhy5bFDhk/TyQ2CDw9gpLfgMnU=; b=PtfuGRCmhDGqkXTccAoSRIjekIHwPQfRcumTLlQ0+Gb5iRmHY6To8vsJ46mJ7tCB7Oqp84qjinK+xojxQfrTovZrmgC+lDKrGJQaSW4mMdcI9K7GqBu+xufaoXdSzAy1SUJFEIcHcU8TJHVhULcy80EfyO2FtlskEPovrG52mTU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1634813142334469.1775733578497; Thu, 21 Oct 2021 03:45:42 -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-406-B_IrAnioNDG0p2B5INn3xw-1; Thu, 21 Oct 2021 06:45:37 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F1E8C180FD85; Thu, 21 Oct 2021 10:45:32 +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 9750C6A8E5; Thu, 21 Oct 2021 10:45:32 +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 48DFD4EA2F; Thu, 21 Oct 2021 10:45:32 +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 19LAjLZM008890 for ; Thu, 21 Oct 2021 06:45:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 70EFA19D9F; Thu, 21 Oct 2021 10:45:21 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5420196AE for ; Thu, 21 Oct 2021 10:45:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634813141; 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=AnH8HN9BJ4y9FeSDyuhy5bFDhk/TyQ2CDw9gpLfgMnU=; b=MtL6jVmuwAs09X/TGvQB27FkBkME7ieq0DFWIgert3gUVEDclTmLZBLN+UdLfR8eLw9kCs BZ2U75gXZfqFyNNBIqALAl7AhyqRuSv7/wy9mxzqwiO2jNPl/dmZGlYG7b1Ej1n05b95VF nBbGQd58dSfDhH1dNH9HkkD0I48z7Ww= X-MC-Unique: B_IrAnioNDG0p2B5INn3xw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 4/6] qemuMonitorJSONGetKVMState: Don't return early on CommandNotFound Date: Thu, 21 Oct 2021 12:45:13 +0200 Message-Id: <59f7b2012a21045855452deb7c501f8fc2ca32e8.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.15 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: 1634813143731100001 Content-Type: text/plain; charset="utf-8" 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 --- src/qemu/qemu_monitor_json.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index df3e14a153..70e3c70441 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -6020,11 +6020,6 @@ int qemuMonitorJSONGetKVMState(qemuMonitor *mon, if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) goto cleanup; =20 - if (qemuMonitorJSONHasError(reply, "CommandNotFound")) { - ret =3D 0; - goto cleanup; - } - if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0) goto cleanup; =20 --=20 2.32.0