]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
kern/efi/sb: Remove duplicate efi_shim_lock_guid variable
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Mon, 17 May 2021 12:57:30 +0000 (20:57 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 28 May 2021 10:49:56 +0000 (12:49 +0200)
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>
grub-core/kern/efi/sb.c

index 96d2377225cde1a0daf6bcfee84212fabb072ad8..c52ec6226a63b4bd75d7765bef87cc803ecee102 100644 (file)
@@ -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. */