From nobody Thu May 15 14:00:45 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 15081520269641011.9248660727709; Mon, 16 Oct 2017 04:07:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9093580473; Mon, 16 Oct 2017 11:07:05 +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 65A495C7A2; Mon, 16 Oct 2017 11:07:05 +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 2DBA13FAEE; Mon, 16 Oct 2017 11:07:05 +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 v9GB6aLj008702 for ; Mon, 16 Oct 2017 07:06:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id D6D0D5D964; Mon, 16 Oct 2017 11:06:36 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E4665D965 for ; Mon, 16 Oct 2017 11:06:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9093580473 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.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:19 +0200 Message-Id: <3579cfa7acc3767fec7aeb5fcfb3961478feccc3.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 06/14] qemu: pass priv data to qemuBuildMonitorCommandLine 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 16 Oct 2017 11:07:06 +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 | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 935b05226d..fa70d15c43 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5609,20 +5609,17 @@ qemuBuildMonitorCommandLine(virLogManagerPtr logMan= ager, virCommandPtr cmd, virQEMUDriverConfigPtr cfg, virDomainDefPtr def, - virQEMUCapsPtr qemuCaps, - virDomainChrSourceDefPtr monitor_chr, - bool monitor_json, - bool chardevStdioLogd) + qemuDomainObjPrivatePtr priv) { char *chrdev; =20 - if (!monitor_chr) + if (!priv->monConfig) return 0; =20 if (!(chrdev =3D qemuBuildChrChardevStr(logManager, cmd, cfg, def, - monitor_chr, "monitor", - qemuCaps, true, - chardevStdioLogd))) + priv->monConfig, "monitor", + priv->qemuCaps, true, + priv->chardevStdioLogd))) return -1; virCommandAddArg(cmd, "-chardev"); virCommandAddArg(cmd, chrdev); @@ -5631,7 +5628,7 @@ qemuBuildMonitorCommandLine(virLogManagerPtr logManag= er, virCommandAddArg(cmd, "-mon"); virCommandAddArgFormat(cmd, "chardev=3Dcharmonitor,id=3Dmonitor,mode=3D%s", - monitor_json ? "control" : "readline"); + priv->monJSON ? "control" : "readline"); =20 return 0; } @@ -9963,7 +9960,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, unsigned int bootHostdevNet =3D 0; qemuDomainObjPrivatePtr priv =3D vm->privateData; virDomainDefPtr def =3D vm->def; - virDomainChrSourceDefPtr monitor_chr =3D priv->monConfig; bool monitor_json =3D priv->monJSON; virQEMUCapsPtr qemuCaps =3D priv->qemuCaps; virBitmapPtr nodeset =3D priv->autoNodeset; @@ -9972,7 +9968,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, monitor_chr, monitor_json, + driver, def, priv->monConfig, monitor_json, qemuCaps, migrateURI, snapshot, vmop); =20 if (qemuBuildCommandLineValidate(driver, def) < 0) @@ -10066,10 +10062,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildSgaCommandLine(cmd, def, qemuCaps) < 0) goto error; =20 - if (qemuBuildMonitorCommandLine(logManager, cmd, cfg, def, - qemuCaps, monitor_chr, - monitor_json, - chardevStdioLogd) < 0) + if (qemuBuildMonitorCommandLine(logManager, cmd, cfg, def, priv) < 0) goto error; =20 if (qemuBuildClockCommandLine(cmd, def, qemuCaps) < 0) --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list