From nobody Tue Feb 10 00:38:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1644000724; cv=none; d=zohomail.com; s=zohoarc; b=lxUly5/u4Gvt3cfGCK8bPdqi2CLIp0DMCOdx63id10ZlLlFI/hr8Fo+yVSMcVCnJYjl6KvxEpSaebSHZQcTAD1+PFkGO+42Ne1bQzAPWt4cBhIk6FQRRIEUu0BI+sdNcSJVbkxEsJ4ZmVHvqPweBlu+/on6RNz/nVygtcw9fNKQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644000724; 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=eAxndR+EeE84h8Af8qGjoeiBpfzn+A6azv4kPf02a3s=; b=Gu5XNm8cVFTVF1pAKrYHWVKbzq5VsKCnDo0dPEQ1NA+Su2ktl/FK6Y5lOisPYPsqHN7CrxTwzQVePukIwBonafzC52LtwVIuCq86Ehodtyf2frNe1w+8duQFbn/gMHE4s88zBQaZwPWiB6z1iiM4yx43HHnp7UuJfO8nX4M8dZo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 164400072416961.200262481628556; Fri, 4 Feb 2022 10:52:04 -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-638-xGMWv2-1NfqDSK9RK0GmiA-1; Fri, 04 Feb 2022 13:51:59 -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 9FB36869EDB; Fri, 4 Feb 2022 18:51:54 +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 6980A34D50; Fri, 4 Feb 2022 18:51:54 +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 450434CA9B; Fri, 4 Feb 2022 18:51:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 214IpPJx002134 for ; Fri, 4 Feb 2022 13:51:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 48920703B5; Fri, 4 Feb 2022 18:51:25 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.193.119]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8956574E87 for ; Fri, 4 Feb 2022 18:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644000723; 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=eAxndR+EeE84h8Af8qGjoeiBpfzn+A6azv4kPf02a3s=; b=c+u2lANpn3QD5DtkFKps8FxX75Ge0bIuUGDxMyCctD8VfydNxypdivceROIX0RZ+OuEWtZ NPGom9Xp2dxJdzOwZ9g/yTgEaGUeYlqG2KkLhCC0X83MC1vEedrk9ll2pT/2Iy2ZzsX5FY COvEv/0+2Vc40TERWmN4Rq+/gkY1iE4= X-MC-Unique: xGMWv2-1NfqDSK9RK0GmiA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 03/14] qemu: Rename qemuTPM{Create, Delete}EmulatorStorage() Date: Fri, 4 Feb 2022 19:51:06 +0100 Message-Id: <20220204185117.61149-4-abologna@redhat.com> In-Reply-To: <20220204185117.61149-1-abologna@redhat.com> References: <20220204185117.61149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644000724727100001 Content-Type: text/plain; charset="utf-8" Other functions that operate on a single TPM emulator follow the qemuTPMEmulatorDoThing() naming convention. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 627c7e631d..8d66a2127e 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -123,9 +123,8 @@ qemuTPMEmulatorInitStorage(const char *swtpmStorageDir) } =20 =20 -/* - * qemuTPMCreateEmulatorStorage - * +/** + * qemuTPMEmulatorCreateStorage: * @storagepath: directory for swtpm's persistent state * @created: a pointer to a bool that will be set to true if the * storage was created because it did not exist yet @@ -137,7 +136,7 @@ qemuTPMEmulatorInitStorage(const char *swtpmStorageDir) * Adapt ownership of the directory and all swtpm's state files there. */ static int -qemuTPMCreateEmulatorStorage(const char *storagepath, +qemuTPMEmulatorCreateStorage(const char *storagepath, bool *created, uid_t swtpm_user, gid_t swtpm_group) @@ -168,7 +167,7 @@ qemuTPMCreateEmulatorStorage(const char *storagepath, =20 =20 static void -qemuTPMDeleteEmulatorStorage(virDomainTPMDef *tpm) +qemuTPMEmulatorDeleteStorage(virDomainTPMDef *tpm) { g_autofree char *path =3D g_path_get_dirname(tpm->data.emulator.stora= gepath); =20 @@ -686,7 +685,7 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, if (!swtpm) return NULL; =20 - if (qemuTPMCreateEmulatorStorage(tpm->data.emulator.storagepath, + if (qemuTPMEmulatorCreateStorage(tpm->data.emulator.storagepath, &created, swtpm_user, swtpm_group) < = 0) return NULL; =20 @@ -765,7 +764,7 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, =20 error: if (created) - qemuTPMDeleteEmulatorStorage(tpm); + qemuTPMEmulatorDeleteStorage(tpm); =20 return NULL; } @@ -870,7 +869,7 @@ qemuExtTPMCleanupHost(virDomainDef *def) continue; =20 if (!def->tpms[i]->data.emulator.persistent_state) - qemuTPMDeleteEmulatorStorage(def->tpms[i]); + qemuTPMEmulatorDeleteStorage(def->tpms[i]); } } =20 --=20 2.34.1