grub-devel
[Top][All Lists]
Advanced

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

[PATCH 8/8] linux: Make load_file2_guid and device_path_guid static


From: Nikita Ermakov
Subject: [PATCH 8/8] linux: Make load_file2_guid and device_path_guid static
Date: Fri, 28 May 2021 16:04:57 +0300

The load_file2_guid and device_path_guid variables must be preserved
outside of the function scope.

Signed-off-by: Nikita Ermakov <arei@altlinux.org>
---
 grub-core/loader/efi/linux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
index 7c71d0336..8fd8e54e1 100644
--- a/grub-core/loader/efi/linux.c
+++ b/grub-core/loader/efi/linux.c
@@ -51,6 +51,8 @@ static grub_addr_t initrd_end;
 static struct grub_linux_initrd_context initrd_ctx = { 0, 0, 0 };
 static grub_efi_handle_t initrd_lf2_handle;
 static int initrd_use_loadfile2;
+static grub_efi_guid_t load_file2_guid = GRUB_EFI_LOAD_FILE2_PROTOCOL_GUID;
+static grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
 
 grub_err_t
 grub_arch_efi_linux_check_image (struct linux_arch_kernel_header * lh)
@@ -330,8 +332,6 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ 
((unused)),
 {
   int initrd_size, initrd_pages;
   void *initrd_mem = NULL;
-  grub_efi_guid_t load_file2_guid = GRUB_EFI_LOAD_FILE2_PROTOCOL_GUID;
-  grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
   grub_efi_boot_services_t *b;
   grub_efi_status_t status;
 
-- 
2.31.1




reply via email to

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