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 <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Tianjia Zhang 2021-05-17 20:57:30 +08:00 committed by Daniel Kiper
parent c0e647eb0e
commit f17e8b9ed2

View File

@ -42,7 +42,6 @@ grub_uint8_t
grub_efi_get_secureboot (void) grub_efi_get_secureboot (void)
{ {
static grub_efi_guid_t efi_variable_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID; 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_status_t status;
grub_efi_uint32_t attr = 0; grub_efi_uint32_t attr = 0;
grub_size_t size = 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 * variable doesn't have the runtime attribute set, we might as well
* honor that. * 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); &size, (void **) &moksbstate, &attr);
/* If it fails, we don't care why. Default to secure. */ /* If it fails, we don't care why. Default to secure. */