From: Tianjia Zhang Date: Mon, 17 May 2021 12:57:30 +0000 (+0800) Subject: kern/efi/sb: Remove duplicate efi_shim_lock_guid variable X-Git-Tag: grub-2.06~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f17e8b9ed2ea4652755200854cf7029c18e25833;p=thirdparty%2Fgrub.git kern/efi/sb: Remove duplicate efi_shim_lock_guid variable The efi_shim_lock_guid local variable and shim_lock_guid global variable have the same GUID value. Only the latter is retained. Signed-off-by: Tianjia Zhang Reviewed-by: Daniel Kiper --- diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c index 96d237722..c52ec6226 100644 --- a/grub-core/kern/efi/sb.c +++ b/grub-core/kern/efi/sb.c @@ -42,7 +42,6 @@ grub_uint8_t grub_efi_get_secureboot (void) { static grub_efi_guid_t efi_variable_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID; - static grub_efi_guid_t efi_shim_lock_guid = GRUB_EFI_SHIM_LOCK_GUID; grub_efi_status_t status; grub_efi_uint32_t attr = 0; grub_size_t size = 0; @@ -81,7 +80,7 @@ grub_efi_get_secureboot (void) * variable doesn't have the runtime attribute set, we might as well * honor that. */ - status = grub_efi_get_variable_with_attributes ("MokSBState", &efi_shim_lock_guid, + status = grub_efi_get_variable_with_attributes ("MokSBState", &shim_lock_guid, &size, (void **) &moksbstate, &attr); /* If it fails, we don't care why. Default to secure. */