mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
util: don't export virTPMEmulatorInit method
Every other exported API from virtpm.h will internally call virTPMEmulatorInit, so there is no reason for this initializer to be exported on its own. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
ac674429c3
commit
c032786e08
@ -3448,7 +3448,6 @@ virTimeStringThenRaw;
|
||||
|
||||
# util/virtpm.h
|
||||
virTPMCreateCancelPath;
|
||||
virTPMEmulatorInit;
|
||||
virTPMGetSwtpm;
|
||||
virTPMGetSwtpmIoctl;
|
||||
virTPMGetSwtpmSetup;
|
||||
|
@ -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;
|
||||
|
||||
if (virTPMEmulatorInit() < 0)
|
||||
return;
|
||||
|
||||
if (!(pathname = qemuTPMCreateEmulatorSocket(swtpmStateDir, shortName)))
|
||||
return;
|
||||
|
||||
|
@ -132,6 +132,8 @@ static virTPMBinaryInfo swtpmBinaries[VIR_TPM_BINARY_LAST] = {
|
||||
},
|
||||
};
|
||||
|
||||
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 = -1;
|
||||
|
@ -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);
|
||||
|
||||
bool virTPMSwtpmCapsGet(unsigned int cap);
|
||||
bool virTPMSwtpmSetupCapsGet(unsigned int cap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user