grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] kern/efi/sb: Remove duplicate variables efi_shim_lock_guid


From: Tianjia Zhang
Subject: [PATCH] kern/efi/sb: Remove duplicate variables efi_shim_lock_guid
Date: Mon, 17 May 2021 20:57:30 +0800

The variable efi_shim_lock_guid and the static variable
shim_lock_guid have the same GUID value, only the global
variable shim_lock_guid is retained.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
 grub-core/kern/efi/sb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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. */
-- 
2.24.3 (Apple Git-128)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]