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>
# util/virtpm.h
virTPMCreateCancelPath;
-virTPMEmulatorInit;
virTPMGetSwtpm;
virTPMGetSwtpmIoctl;
virTPMGetSwtpmSetup;
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;
if (!swtpm_ioctl)
return;
- if (virTPMEmulatorInit() < 0)
- return;
-
if (!(pathname = qemuTPMCreateEmulatorSocket(swtpmStateDir, shortName)))
return;
},
};
+static int virTPMEmulatorInit(void);
+
static char *
virTPMBinaryGetPath(virTPMBinary binary)
{
* 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;
char *virTPMGetSwtpm(void);
char *virTPMGetSwtpmSetup(void);
char *virTPMGetSwtpmIoctl(void);
-int virTPMEmulatorInit(void);
bool virTPMSwtpmCapsGet(unsigned int cap);
bool virTPMSwtpmSetupCapsGet(unsigned int cap);