In virtpm.h there are two functions exposed for querying swtpm
and swtpm_setup capabilities: virTPMSwtpmCapsGet() and
virTPMSwtpmSetupCapsGet(), respectively. The capabilities we are
interested in are defined in two separate enums
(virTPMSwtpmFeature and virTPMSwtpmSetupFeature), but these
functions accept capability as an unsigned int rather than their
respective enum. While this makes sense for
virTPMBinaryGetCaps(), which is a module internal helper that
both exposed functions call, there's no need for the functions
themselves to accept unsigned int.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
}
bool
-virTPMSwtpmCapsGet(unsigned int cap)
+virTPMSwtpmCapsGet(virTPMSwtpmFeature cap)
{
return virTPMBinaryGetCaps(VIR_TPM_BINARY_SWTPM, cap);
}
bool
-virTPMSwtpmSetupCapsGet(unsigned int cap)
+virTPMSwtpmSetupCapsGet(virTPMSwtpmSetupFeature cap)
{
return virTPMBinaryGetCaps(VIR_TPM_BINARY_SWTPM_SETUP, cap);
}
bool virTPMHasSwtpm(void);
-bool virTPMSwtpmCapsGet(unsigned int cap);
-bool virTPMSwtpmSetupCapsGet(unsigned int cap);
-
typedef enum {
VIR_TPM_SWTPM_FEATURE_CMDARG_PWD_FD,
VIR_ENUM_DECL(virTPMSwtpmFeature);
VIR_ENUM_DECL(virTPMSwtpmSetupFeature);
+
+bool virTPMSwtpmCapsGet(virTPMSwtpmFeature cap);
+bool virTPMSwtpmSetupCapsGet(virTPMSwtpmSetupFeature cap);