From nobody Thu May 15 13:17:09 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 150815203192182.50344652396439; Mon, 16 Oct 2017 04:07:11 -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 CA8637E420; Mon, 16 Oct 2017 11:07:10 +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 9AD375C7A4; Mon, 16 Oct 2017 11:07:10 +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 647813FC73; Mon, 16 Oct 2017 11:07:10 +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 v9GB6c36008719 for ; Mon, 16 Oct 2017 07:06:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7D6BA5D964; Mon, 16 Oct 2017 11:06:38 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 036685D961 for ; Mon, 16 Oct 2017 11:06:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CA8637E420 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.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:21 +0200 Message-Id: <000460891a73cf70a67a1cabb14346008f904ca2.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 08/14] qemu: pass priv data to qemuBuildMasterKeyCommandLine 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.27]); Mon, 16 Oct 2017 11:07:11 +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 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index da59a1fd63..5441f5e37f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -201,8 +201,7 @@ qemuBuildHasMasterKey(virQEMUCapsPtr qemuCaps) */ static int qemuBuildMasterKeyCommandLine(virCommandPtr cmd, - virQEMUCapsPtr qemuCaps, - const char *domainLibDir) + qemuDomainObjPrivatePtr priv) { int ret =3D -1; char *alias =3D NULL; @@ -213,7 +212,7 @@ qemuBuildMasterKeyCommandLine(virCommandPtr cmd, * means the domain won't be able to use a secret master key and is * not a failure. */ - if (!qemuBuildHasMasterKey(qemuCaps)) { + if (!qemuBuildHasMasterKey(priv->qemuCaps)) { VIR_INFO("secret object is not supported by this QEMU binary"); return 0; } @@ -226,7 +225,7 @@ qemuBuildMasterKeyCommandLine(virCommandPtr cmd, * than other command line options which do not check for the * existence of socket files before using. */ - if (!(path =3D qemuDomainGetMasterKeyFilePath(domainLibDir))) + if (!(path =3D qemuDomainGetMasterKeyFilePath(priv->libDir))) goto cleanup; =20 virCommandAddArg(cmd, "-object"); @@ -9962,7 +9961,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, virDomainDefPtr def =3D vm->def; virQEMUCapsPtr qemuCaps =3D priv->qemuCaps; virBitmapPtr nodeset =3D priv->autoNodeset; - const char *domainLibDir =3D priv->libDir; bool chardevStdioLogd =3D priv->chardevStdioLogd; =20 VIR_DEBUG("driver=3D%p def=3D%p mon=3D%p json=3D%d " @@ -9991,7 +9989,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (!standalone) virCommandAddArg(cmd, "-S"); /* freeze CPU */ =20 - if (qemuBuildMasterKeyCommandLine(cmd, qemuCaps, domainLibDir) < 0) + if (qemuBuildMasterKeyCommandLine(cmd, priv) < 0) goto error; =20 if (enableFips) --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list