grub-devel
[Top][All Lists]
Advanced

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

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


From: Heinrich Schuchardt
Subject: Re: [PATCH 8/8] linux: Make load_file2_guid and device_path_guid static
Date: Fri, 28 May 2021 21:54:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

On 5/28/21 3:04 PM, Nikita Ermakov wrote:
The load_file2_guid and device_path_guid variables must be preserved
outside of the function scope.

It is not helpful to introduce a bug in patch 3 and later resolve it in
patch 8. Please, squash the two patches into one.

Best regards

Heinrich


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;






reply via email to

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