From nobody Sun Apr 28 20:52:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1583419659; cv=none; d=zohomail.com; s=zohoarc; b=hoqGb+78eD/CwH1djzh+WVtxQR55XPEYApLQp3DkBNGPjk1Hyy2PpKRs8pwBFBz+L7TD1+oUqTNEL7nuN1ViomMxfXWpEb8MGtbPBPBLRJOV2rMQ30c13k3eoRQxTiLThJfFEGKlva4tPn5ukBp0h5P/P4y8hPhF7iGii1T9fjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583419659; 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=AmJ/UhMeKurA33JPC2I0m6CF9PV7MWtPOsFQaUAmPDs=; b=F5RsqkEeieYbxi2ehF41OJwFkNgqrYTOMHbk8Wz2VHNiaHXFEVJIZ898fmf4ZyPXpi8zwk3PWBNw1LQ4NvegcdCgPn8AoKEHUHWTe4XsaiostqrL0I0dNPZLydGANB3sCrOMmA5sBTpiwo4xn/Z32CFXesqbHYCqQOyrqK5DXcI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1583419658952312.1405609895495; Thu, 5 Mar 2020 06:47:38 -0800 (PST) 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-405-zayD-2ZyPSikELEv-vqevw-1; Thu, 05 Mar 2020 09:47:35 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE4C8800053; Thu, 5 Mar 2020 14:47:29 +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 2A3F51001B2B; Thu, 5 Mar 2020 14:47:29 +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 13BCB84488; Thu, 5 Mar 2020 14:47:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 025ElM1M013100 for ; Thu, 5 Mar 2020 09:47:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 253422037E5B; Thu, 5 Mar 2020 14:47:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1EBD82037E44 for ; Thu, 5 Mar 2020 14:47:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 735398007C9 for ; Thu, 5 Mar 2020 14:47:19 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-u5AZTKAqPV-I4aF2thPOJw-1; Thu, 05 Mar 2020 09:47:17 -0500 Received: from dhcp-172-16-24-106.sw.ru ([172.16.24.106] helo=shiny.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1j9rmL-0006mo-Se for libvir-list@redhat.com; Thu, 05 Mar 2020 17:47:14 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583419658; 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=AmJ/UhMeKurA33JPC2I0m6CF9PV7MWtPOsFQaUAmPDs=; b=LwNXRBodc2YAQCM8NJvy3Y4ZcCCMdgfPluYSQnc8N1szRpPPEzrHr9qFz0Ezb6AcTAWlEV UwDMkKyl9lR2JF7wqUnIk8Rq6YtpyzMJCKRrHIpodCmO/f7gcBMbnpOyKI+wD+R0U97peb +/aYccUi+UH870nWZJ6WIpL3bBzV5A0= X-MC-Unique: zayD-2ZyPSikELEv-vqevw-1 X-MC-Unique: u5AZTKAqPV-I4aF2thPOJw-1 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH 1/2] qemu: agent: sync once if qemu has serial port event Date: Thu, 5 Mar 2020 17:47:01 +0300 Message-Id: <20200305144702.6681-2-nshirokovskiy@virtuozzo.com> In-Reply-To: <20200305144702.6681-1-nshirokovskiy@virtuozzo.com> References: <20200305144702.6681-1-nshirokovskiy@virtuozzo.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 025ElM1M013100 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.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Sync was introduced in [1] to check for ga presence. This check is racy but in the era before serial events are available there was not better solution I guess. In case we have the events the sync function is different. It allows us to flush stateless ga channel from remnants of previous communications. But we need to do it only once. Until we get timeout on issued command channel state is ok. [1] qemu_agent: Issue guest-sync prior to every command Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Michal Privoznik --- src/qemu/qemu_agent.c | 13 ++++++++++++- src/qemu/qemu_agent.h | 3 ++- src/qemu/qemu_process.c | 3 ++- tests/qemumonitortestutils.c | 3 ++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index cd25ef6cd3..2de53efb7a 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -104,6 +104,8 @@ struct _qemuAgent { int watch; =20 bool running; + bool singleSync; + bool inSync; =20 virDomainObjPtr vm; =20 @@ -679,7 +681,8 @@ qemuAgentIO(int watch, int fd, int events, void *opaque) qemuAgentPtr qemuAgentOpen(virDomainObjPtr vm, const virDomainChrSourceDef *config, - qemuAgentCallbacksPtr cb) + qemuAgentCallbacksPtr cb, + bool singleSync) { qemuAgentPtr mon; =20 @@ -705,6 +708,7 @@ qemuAgentOpen(virDomainObjPtr vm, } mon->vm =3D vm; mon->cb =3D cb; + mon->singleSync =3D singleSync; =20 switch (config->type) { case VIR_DOMAIN_CHR_TYPE_UNIX: @@ -869,6 +873,7 @@ static int qemuAgentSend(qemuAgentPtr mon, _("Unable to wait on agent monitor " "condition")); } + mon->inSync =3D false; goto cleanup; } } @@ -910,6 +915,9 @@ qemuAgentGuestSync(qemuAgentPtr mon) qemuAgentMessage sync_msg; int timeout =3D VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT; =20 + if (mon->singleSync && mon->inSync) + return 0; + /* if user specified a custom agent timeout that is lower than the * default timeout, use the shorter timeout instead */ if ((mon->timeout >=3D 0) && (mon->timeout < timeout)) @@ -955,6 +963,9 @@ qemuAgentGuestSync(qemuAgentPtr mon) } } =20 + if (mon->singleSync) + mon->inSync =3D true; + ret =3D 0; =20 cleanup: diff --git a/src/qemu/qemu_agent.h b/src/qemu/qemu_agent.h index 5656fe60ff..f9f75cee25 100644 --- a/src/qemu/qemu_agent.h +++ b/src/qemu/qemu_agent.h @@ -41,7 +41,8 @@ struct _qemuAgentCallbacks { =20 qemuAgentPtr qemuAgentOpen(virDomainObjPtr vm, const virDomainChrSourceDef *config, - qemuAgentCallbacksPtr cb); + qemuAgentCallbacksPtr cb, + bool singleSync); =20 void qemuAgentClose(qemuAgentPtr mon); =20 diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 36fbffd7b8..a910afc307 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -237,7 +237,8 @@ qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjP= tr vm) =20 agent =3D qemuAgentOpen(vm, config->source, - &agentCallbacks); + &agentCallbacks, + virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VSERPOR= T_CHANGE)); =20 virObjectLock(vm); =20 diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 00f5b49439..c3e4d86dd6 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -1393,7 +1393,8 @@ qemuMonitorTestNewAgent(virDomainXMLOptionPtr xmlopt) =20 if (!(test->agent =3D qemuAgentOpen(test->vm, &src, - &qemuMonitorTestAgentCallbacks))) + &qemuMonitorTestAgentCallbacks, + false))) goto error; =20 virObjectLock(test->agent); --=20 2.23.0 From nobody Sun Apr 28 20:52:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1583419678; cv=none; d=zohomail.com; s=zohoarc; b=kyoBnI8NiPFmo7y/gOzWEj20Xphplm+aoQlwdlPLnKrKnMClZvBZNmzdXi7NW2/HeHXdIE4mMrWSz6r7Fi05T0HNm9aGqk1KD68a9lDFCO18IpLKZNIs5BMnr4L5+w4kIC6W/b90Lypf1TKLmMIde18jfbgacFIUXuuBL2QRlmo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583419678; 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=XyKwXitFtXBWO6PgIwDJTd+FjOjVaHMp8sSnGTjYXOE=; b=gJI7sMmpVSTFtMT+siRkDsgUEglEMtgSWU+cKjaTsxMzc9SNQhlCoiFYYjz6BzLCyMWYuL1Omxz4omN3ZtDmYC/ewf4bYxmvqS0jT2dC/SWTLIJpOtZA74qa93IUjJZqR+L0u1QsgFEwjOAKHhS5f30QYbkbbE+J85C6a+KcOFM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1583419678422903.8802703320457; Thu, 5 Mar 2020 06:47:58 -0800 (PST) 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-154-RsDK4MmuOA63VqCeMcxKkA-1; Thu, 05 Mar 2020 09:47:55 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD90A801E5C; Thu, 5 Mar 2020 14:47:49 +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 9E4F990538; Thu, 5 Mar 2020 14:47:49 +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 4C58284493; Thu, 5 Mar 2020 14:47:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 025ElMai013101 for ; Thu, 5 Mar 2020 09:47:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 260232037E43; Thu, 5 Mar 2020 14:47:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F9342037E4F for ; Thu, 5 Mar 2020 14:47:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 282BA8007DC for ; Thu, 5 Mar 2020 14:47:20 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-eYch2g-7NZqAIUhGkQNiYA-1; Thu, 05 Mar 2020 09:47:17 -0500 Received: from dhcp-172-16-24-106.sw.ru ([172.16.24.106] helo=shiny.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1j9rmM-0006mo-4X for libvir-list@redhat.com; Thu, 05 Mar 2020 17:47:14 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583419677; 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=XyKwXitFtXBWO6PgIwDJTd+FjOjVaHMp8sSnGTjYXOE=; b=JPII+iL4vkPqqoQHZrr44LT7cJmun5bKyI2rf9fAXQ6qCw/HU3IbmJTQ1IanaHXB4qY0R0 w2xX5JrVqu7g7jD1Npi4+qwzPo792Q+VdPSC3DyasJl8nMOvLZtFvMexBQnbCCGOY58RH8 dAo2NqArCtwZAPOlSjp4Yqp+wjU5zSg= X-MC-Unique: RsDK4MmuOA63VqCeMcxKkA-1 X-MC-Unique: eYch2g-7NZqAIUhGkQNiYA-1 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH 2/2] qemu: remove redundant needReply argument of qemuAgentCommand Date: Thu, 5 Mar 2020 17:47:02 +0300 Message-Id: <20200305144702.6681-3-nshirokovskiy@virtuozzo.com> In-Reply-To: <20200305144702.6681-1-nshirokovskiy@virtuozzo.com> References: <20200305144702.6681-1-nshirokovskiy@virtuozzo.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 025ElMai013101 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.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" needReply added in [1] looks redundant. Indeed it is set to false only when mon->await_event is set too (the only exception qemuAgentFSTrim which is mistaken). However it fixes the issue when qemuAgentCommand exits on error path and mon->await_event is not reset. Let's instead reset mon->await_event properl= y. Also remove "Woken up by event" debug message as it can be misleading. We can get it also if monitor is closed due to serial changed event currently. Anyway both qemuAgentClose and qemuAgentNotifyEvent log itself. [1] qemu: make sure agent returns error when required data are missing Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_agent.c | 47 ++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 2de53efb7a..605c9f563e 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -1112,7 +1112,6 @@ static int qemuAgentCommand(qemuAgentPtr mon, virJSONValuePtr cmd, virJSONValuePtr *reply, - bool needReply, int seconds) { int ret =3D -1; @@ -1121,17 +1120,16 @@ qemuAgentCommand(qemuAgentPtr mon, int await_event =3D mon->await_event; =20 *reply =3D NULL; + memset(&msg, 0, sizeof(msg)); =20 if (!mon->running) { virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s", _("Guest agent disappeared while executing command"= )); - return -1; + goto cleanup; } =20 if (qemuAgentGuestSync(mon) < 0) - return -1; - - memset(&msg, 0, sizeof(msg)); + goto cleanup; =20 if (!(cmdstr =3D virJSONValueToString(cmd, false))) goto cleanup; @@ -1149,9 +1147,7 @@ qemuAgentCommand(qemuAgentPtr mon, /* If we haven't obtained any reply but we wait for an * event, then don't report this as error */ if (!msg.rxObject) { - if (await_event && !needReply) { - VIR_DEBUG("Woken up by event %d", await_event); - } else { + if (!await_event) { if (mon->running) virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Missing monitor reply object")); @@ -1169,6 +1165,7 @@ qemuAgentCommand(qemuAgentPtr mon, cleanup: VIR_FREE(cmdstr); VIR_FREE(msg.txBuffer); + mon->await_event =3D QEMU_AGENT_EVENT_NONE; =20 return ret; } @@ -1269,7 +1266,7 @@ int qemuAgentShutdown(qemuAgentPtr mon, mon->await_event =3D QEMU_AGENT_EVENT_RESET; else mon->await_event =3D QEMU_AGENT_EVENT_SHUTDOWN; - ret =3D qemuAgentCommand(mon, cmd, &reply, false, + ret =3D qemuAgentCommand(mon, cmd, &reply, VIR_DOMAIN_QEMU_AGENT_COMMAND_SHUTDOWN); =20 virJSONValueFree(cmd); @@ -1312,7 +1309,7 @@ int qemuAgentFSFreeze(qemuAgentPtr mon, const char **= mountpoints, if (!cmd) goto cleanup; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 if (virJSONValueObjectGetNumberInt(reply, "return", &ret) < 0) { @@ -1349,7 +1346,7 @@ int qemuAgentFSThaw(qemuAgentPtr mon) if (!cmd) return -1; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 if (virJSONValueObjectGetNumberInt(reply, "return", &ret) < 0) { @@ -1386,7 +1383,7 @@ qemuAgentSuspend(qemuAgentPtr mon, return -1; =20 mon->await_event =3D QEMU_AGENT_EVENT_SUSPEND; - ret =3D qemuAgentCommand(mon, cmd, &reply, false, mon->timeout); + ret =3D qemuAgentCommand(mon, cmd, &reply, mon->timeout); =20 virJSONValueFree(cmd); virJSONValueFree(reply); @@ -1415,7 +1412,7 @@ qemuAgentArbitraryCommand(qemuAgentPtr mon, if (!(cmd =3D virJSONValueFromString(cmd_str))) goto cleanup; =20 - if ((ret =3D qemuAgentCommand(mon, cmd, &reply, true, timeout)) < 0) + if ((ret =3D qemuAgentCommand(mon, cmd, &reply, timeout)) < 0) goto cleanup; =20 if (!(*result =3D virJSONValueToString(reply, false))) @@ -1442,7 +1439,7 @@ qemuAgentFSTrim(qemuAgentPtr mon, if (!cmd) return ret; =20 - ret =3D qemuAgentCommand(mon, cmd, &reply, false, mon->timeout); + ret =3D qemuAgentCommand(mon, cmd, &reply, mon->timeout); =20 virJSONValueFree(cmd); virJSONValueFree(reply); @@ -1463,7 +1460,7 @@ qemuAgentGetVCPUs(qemuAgentPtr mon, if (!(cmd =3D qemuAgentMakeCommand("guest-get-vcpus", NULL))) return -1; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 if (!(data =3D virJSONValueObjectGetArray(reply, "return"))) { @@ -1576,7 +1573,7 @@ qemuAgentSetVCPUsCommand(qemuAgentPtr mon, NULL))) goto cleanup; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 /* All negative values are invalid. Return of 0 is bogus since we woul= dn't @@ -1731,7 +1728,7 @@ qemuAgentGetHostname(qemuAgentPtr mon, if (!cmd) return ret; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) { + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) { if (qemuAgentErrorCommandUnsupported(reply)) ret =3D -2; goto cleanup; @@ -1775,7 +1772,7 @@ qemuAgentGetTime(qemuAgentPtr mon, if (!cmd) return ret; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 if (virJSONValueObjectGetNumberUlong(reply, "return", &json_time) < 0)= { @@ -1840,7 +1837,7 @@ qemuAgentSetTime(qemuAgentPtr mon, if (!cmd) return ret; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 ret =3D 0; @@ -1977,7 +1974,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon, if (!cmd) return ret; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) { + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) { if (qemuAgentErrorCommandUnsupported(reply)) ret =3D -2; goto cleanup; @@ -2128,7 +2125,7 @@ qemuAgentGetInterfaces(qemuAgentPtr mon, if (!(cmd =3D qemuAgentMakeCommand("guest-network-get-interfaces", NUL= L))) goto cleanup; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 if (!(ret_array =3D virJSONValueObjectGet(reply, "return"))) { @@ -2305,7 +2302,7 @@ qemuAgentSetUserPassword(qemuAgentPtr mon, NULL))) goto cleanup; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) goto cleanup; =20 ret =3D 0; @@ -2336,7 +2333,7 @@ qemuAgentGetUsers(qemuAgentPtr mon, if (!(cmd =3D qemuAgentMakeCommand("guest-get-users", NULL))) return -1; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) { + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) { if (qemuAgentErrorCommandUnsupported(reply)) return -2; return -1; @@ -2425,7 +2422,7 @@ qemuAgentGetOSInfo(qemuAgentPtr mon, if (!(cmd =3D qemuAgentMakeCommand("guest-get-osinfo", NULL))) return -1; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) { + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) { if (qemuAgentErrorCommandUnsupported(reply)) return -2; return -1; @@ -2480,7 +2477,7 @@ qemuAgentGetTimezone(qemuAgentPtr mon, if (!(cmd =3D qemuAgentMakeCommand("guest-get-timezone", NULL))) return -1; =20 - if (qemuAgentCommand(mon, cmd, &reply, true, mon->timeout) < 0) { + if (qemuAgentCommand(mon, cmd, &reply, mon->timeout) < 0) { if (qemuAgentErrorCommandUnsupported(reply)) return -2; return -1; --=20 2.23.0