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
|
# util/virtpm.h
|
||||||
virTPMCreateCancelPath;
|
virTPMCreateCancelPath;
|
||||||
virTPMEmulatorInit;
|
|
||||||
virTPMGetSwtpm;
|
virTPMGetSwtpm;
|
||||||
virTPMGetSwtpmIoctl;
|
virTPMGetSwtpmIoctl;
|
||||||
virTPMGetSwtpmSetup;
|
virTPMGetSwtpmSetup;
|
||||||
|
@ -295,9 +295,6 @@ qemuTPMEmulatorPrepareHost(virDomainTPMDef *tpm,
|
|||||||
uid_t qemu_user,
|
uid_t qemu_user,
|
||||||
const char *shortName)
|
const char *shortName)
|
||||||
{
|
{
|
||||||
if (virTPMEmulatorInit() < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* create log dir ... allow 'tss' user to cd into it */
|
/* create log dir ... allow 'tss' user to cd into it */
|
||||||
if (g_mkdir_with_parents(logDir, 0711) < 0)
|
if (g_mkdir_with_parents(logDir, 0711) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -804,9 +801,6 @@ qemuTPMEmulatorStop(const char *swtpmStateDir,
|
|||||||
if (!swtpm_ioctl)
|
if (!swtpm_ioctl)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (virTPMEmulatorInit() < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!(pathname = qemuTPMCreateEmulatorSocket(swtpmStateDir, shortName)))
|
if (!(pathname = qemuTPMCreateEmulatorSocket(swtpmStateDir, shortName)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -132,6 +132,8 @@ static virTPMBinaryInfo swtpmBinaries[VIR_TPM_BINARY_LAST] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int virTPMEmulatorInit(void);
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
virTPMBinaryGetPath(virTPMBinary binary)
|
virTPMBinaryGetPath(virTPMBinary binary)
|
||||||
{
|
{
|
||||||
@ -264,7 +266,7 @@ virTPMGetCaps(virTPMBinaryCapsParse capsParse,
|
|||||||
* Initialize the Emulator functions by searching for necessary
|
* Initialize the Emulator functions by searching for necessary
|
||||||
* executables that we will use to start and setup the swtpm
|
* executables that we will use to start and setup the swtpm
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
virTPMEmulatorInit(void)
|
virTPMEmulatorInit(void)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
@ -25,7 +25,6 @@ char *virTPMCreateCancelPath(const char *devpath) G_GNUC_NO_INLINE;
|
|||||||
char *virTPMGetSwtpm(void);
|
char *virTPMGetSwtpm(void);
|
||||||
char *virTPMGetSwtpmSetup(void);
|
char *virTPMGetSwtpmSetup(void);
|
||||||
char *virTPMGetSwtpmIoctl(void);
|
char *virTPMGetSwtpmIoctl(void);
|
||||||
int virTPMEmulatorInit(void);
|
|
||||||
|
|
||||||
bool virTPMSwtpmCapsGet(unsigned int cap);
|
bool virTPMSwtpmCapsGet(unsigned int cap);
|
||||||
bool virTPMSwtpmSetupCapsGet(unsigned int cap);
|
bool virTPMSwtpmSetupCapsGet(unsigned int cap);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user