From nobody Thu May 15 13:32:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1508152031353514.2582633480705; Mon, 16 Oct 2017 04:07:11 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 2D713C04AC4D; Mon, 16 Oct 2017 11:07:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0437A62923; Mon, 16 Oct 2017 11:07:08 +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 BFDDB18355D9; Mon, 16 Oct 2017 11:07:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9GB6b2b008709 for ; Mon, 16 Oct 2017 07:06:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id A9C165D964; Mon, 16 Oct 2017 11:06:37 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 308215D961 for ; Mon, 16 Oct 2017 11:06:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2D713C04AC4D Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Date: Mon, 16 Oct 2017 13:06:20 +0200 Message-Id: <652317a362611e905c2709217e8c90ac1a5b331d.1508151956.git.phrdina@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/14] qemu: pass priv data to qemuBuildPMCommandLine 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 16 Oct 2017 11:07:08 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fa70d15c43..da59a1fd63 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6485,10 +6485,10 @@ qemuBuildClockCommandLine(virCommandPtr cmd, static int qemuBuildPMCommandLine(virCommandPtr cmd, const virDomainDef *def, - virQEMUCapsPtr qemuCaps, - bool monitor_json) + qemuDomainObjPrivatePtr priv) { bool allowReboot =3D true; + virQEMUCapsPtr qemuCaps =3D priv->qemuCaps; =20 /* Only add -no-reboot option if each event destroys domain */ if (def->onReboot =3D=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY && @@ -6503,7 +6503,7 @@ qemuBuildPMCommandLine(virCommandPtr cmd, * when QEMU stops. If we use no-shutdown, then we can * watch for this event and do a soft/warm reboot. */ - if (monitor_json && allowReboot && + if (priv->monJSON && allowReboot && virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) { virCommandAddArg(cmd, "-no-shutdown"); } @@ -9960,7 +9960,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, unsigned int bootHostdevNet =3D 0; qemuDomainObjPrivatePtr priv =3D vm->privateData; virDomainDefPtr def =3D vm->def; - bool monitor_json =3D priv->monJSON; virQEMUCapsPtr qemuCaps =3D priv->qemuCaps; virBitmapPtr nodeset =3D priv->autoNodeset; const char *domainLibDir =3D priv->libDir; @@ -9968,7 +9967,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, =20 VIR_DEBUG("driver=3D%p def=3D%p mon=3D%p json=3D%d " "qemuCaps=3D%p migrateURI=3D%s snapshot=3D%p vmop=3D%d", - driver, def, priv->monConfig, monitor_json, + driver, def, priv->monConfig, priv->monJSON, qemuCaps, migrateURI, snapshot, vmop); =20 if (qemuBuildCommandLineValidate(driver, def) < 0) @@ -10068,7 +10067,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildClockCommandLine(cmd, def, qemuCaps) < 0) goto error; =20 - if (qemuBuildPMCommandLine(cmd, def, qemuCaps, monitor_json) < 0) + if (qemuBuildPMCommandLine(cmd, def, priv) < 0) goto error; =20 if (qemuBuildBootCommandLine(cmd, def, qemuCaps) < 0) --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list