From nobody Sun Feb 8 07:07:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1637768705; cv=none; d=zohomail.com; s=zohoarc; b=RVWnL+ki4DBRg8dllafrE18k717B8MFnXlqh3rah/+kt90POBAAZhcT5XfxcMHQcVDbGEFmDofmv8QhiaE9ELAiZ4GhQFABZ7zePjUh2zeMCdzvp9M8LescntDn9xeWTWWcJScZ9xsi3RGSrkkNLRa7elXFclmTPJmTGu3LbXkQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637768705; 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=CYJWG6poZYY0gkqaDhq1f6haHMfg2dcFlLq11wAh2Ow=; b=i17kMvI12zl+S3EZKyXH8ZiXQRAiLAiCJK2ebsUglDz8wE7SwjgzOEzCk0PAMY/yfIJ3DpFOn1mE26A94FxdxLJxutiLbmBVwKtf+sNHpRuu92k7bFohTtufXHUgoXmCzHWeyrxpE/rIiJBsKnnApMdKYHm9jAju6ytRbhWyPOg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1637768705346395.409326110042; Wed, 24 Nov 2021 07:45:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-333--K1yYmxvNLe6aAJHXIS22g-1; Wed, 24 Nov 2021 10:45:02 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 99BD381EE76; Wed, 24 Nov 2021 15:44:51 +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 17C4D196E5; Wed, 24 Nov 2021 15:44:51 +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 CFC2A1809CBA; Wed, 24 Nov 2021 15:44:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AOFiVU4027911 for ; Wed, 24 Nov 2021 10:44:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 97DD979457; Wed, 24 Nov 2021 15:44:31 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0827879454; Wed, 24 Nov 2021 15:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637768704; 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=CYJWG6poZYY0gkqaDhq1f6haHMfg2dcFlLq11wAh2Ow=; b=CgaWJK2vWCU+8u0+Wdu7AY+WHl2zpNhApzBdPZpsSr0VIAOq8MWTHDoYnJS9dPEpHLfwEW +Mwx5qgM8uYHn4275FUSLmrpbR1qrps6VFfKz+tbBwijXvkGBQdjmSmBXugkW50G8AOxop 9eWc+AzEFreyEvzM73+KOImUH4guhW0= X-MC-Unique: -K1yYmxvNLe6aAJHXIS22g-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH v2 05/12] util: don't export virTPMEmulatorInit method Date: Wed, 24 Nov 2021 15:44:09 +0000 Message-Id: <20211124154416.369770-6-berrange@redhat.com> In-Reply-To: <20211124154416.369770-1-berrange@redhat.com> References: <20211124154416.369770-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.23 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1637768707558100001 Every other exportd API from virtpm.h will internally call virTPMEmulatorInit, so there is no reason for this initializer to be exported on its own. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 1 - src/qemu/qemu_tpm.c | 6 ------ src/util/virtpm.c | 4 +++- src/util/virtpm.h | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index b98cb0f66d..6b179a61b9 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3447,7 +3447,6 @@ virTimeStringThenRaw; =20 # util/virtpm.h virTPMCreateCancelPath; -virTPMEmulatorInit; virTPMGetSwtpm; virTPMGetSwtpmIoctl; virTPMGetSwtpmSetup; diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 62f54f56ab..1b923fd68e 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -295,9 +295,6 @@ qemuTPMEmulatorPrepareHost(virDomainTPMDef *tpm, uid_t qemu_user, const char *shortName) { - if (virTPMEmulatorInit() < 0) - return -1; - /* create log dir ... allow 'tss' user to cd into it */ if (g_mkdir_with_parents(logDir, 0711) < 0) return -1; @@ -804,9 +801,6 @@ qemuTPMEmulatorStop(const char *swtpmStateDir, if (!swtpm_ioctl) return; =20 - if (virTPMEmulatorInit() < 0) - return; - if (!(pathname =3D qemuTPMCreateEmulatorSocket(swtpmStateDir, shortNam= e))) return; =20 diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 2539ea9275..3ea3b668e2 100644 --- a/src/util/virtpm.c +++ b/src/util/virtpm.c @@ -132,6 +132,8 @@ static virTPMBinaryInfo swtpmBinaries[VIR_TPM_BINARY_LA= ST] =3D { }, }; =20 +static int virTPMEmulatorInit(void); + static char * virTPMBinaryGetPath(virTPMBinary binary) { @@ -264,7 +266,7 @@ virTPMGetCaps(virTPMBinaryCapsParse capsParse, * Initialize the Emulator functions by searching for necessary * executables that we will use to start and setup the swtpm */ -int +static int virTPMEmulatorInit(void) { int ret =3D -1; diff --git a/src/util/virtpm.h b/src/util/virtpm.h index defea6c106..4c16332f9b 100644 --- a/src/util/virtpm.h +++ b/src/util/virtpm.h @@ -25,7 +25,6 @@ char *virTPMCreateCancelPath(const char *devpath) G_GNUC_= NO_INLINE; char *virTPMGetSwtpm(void); char *virTPMGetSwtpmSetup(void); char *virTPMGetSwtpmIoctl(void); -int virTPMEmulatorInit(void); =20 bool virTPMSwtpmCapsGet(unsigned int cap); bool virTPMSwtpmSetupCapsGet(unsigned int cap); --=20 2.33.1