summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-06-24 12:38:00 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-06-24 16:50:15 +0200
commitd80dd9e7853256f27847238771bf34c7157b8894 (patch)
tree7f6898e5cbfd0428203a51c637d14f9675f83bd1
parent915f15ac5746739da0aa2ee2840c2d00dc65aaaa (diff)
efi_loader: size of secure boot variables
The variables SetupMode, AuditMode, DeployedMode are explicitly defined as UINT8 in the UEFI specification. The type of SecureBoot is UINT8 in EDK2. Use variable name secure_boot instead of sec_boot for the value of the UEFI variable SecureBoot. Avoid abbreviations in function descriptions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--lib/efi_loader/efi_variable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index 4d275b23ce7..6271dbcf41f 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -185,17 +185,17 @@ static const char *parse_attr(const char *str, u32 *attrp, u64 *timep)
/**
* efi_set_secure_state - modify secure boot state variables
- * @sec_boot: value of SecureBoot
+ * @secure_boot: value of SecureBoot
* @setup_mode: value of SetupMode
* @audit_mode: value of AuditMode
* @deployed_mode: value of DeployedMode
*
- * Modify secure boot stat-related variables as indicated.
+ * Modify secure boot status related variables as indicated.
*
* Return: status code
*/
-static efi_status_t efi_set_secure_state(int sec_boot, int setup_mode,
- int audit_mode, int deployed_mode)
+static efi_status_t efi_set_secure_state(u8 secure_boot, u8 setup_mode,
+ u8 audit_mode, u8 deployed_mode)
{
u32 attributes;
efi_status_t ret;
@@ -204,8 +204,8 @@ static efi_status_t efi_set_secure_state(int sec_boot, int setup_mode,
EFI_VARIABLE_RUNTIME_ACCESS |
READ_ONLY;
ret = efi_set_variable_common(L"SecureBoot", &efi_global_variable_guid,
- attributes, sizeof(sec_boot), &sec_boot,
- false);
+ attributes, sizeof(secure_boot),
+ &secure_boot, false);
if (ret != EFI_SUCCESS)
goto err;