Blame SOURCES/0339-arm-uboot-ia64-sparc64-Fix-up-grub_file_open-calls.patch

3efed6
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
3efed6
From: Leif Lindholm <leif.lindholm@linaro.org>
3efed6
Date: Wed, 14 Nov 2018 19:29:19 +0000
3efed6
Subject: [PATCH] arm-uboot, ia64, sparc64: Fix up grub_file_open() calls
3efed6
3efed6
The verifiers framework changed the grub_file_open() interface, breaking all
3efed6
non-x86 linux loaders. Add file types to the grub_file_open() calls to make
3efed6
them build again.
3efed6
3efed6
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
3efed6
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3efed6
---
3efed6
 grub-core/loader/arm/linux.c              | 6 +++---
3efed6
 grub-core/loader/ia64/efi/linux.c         | 2 +-
3efed6
 grub-core/loader/sparc64/ieee1275/linux.c | 2 +-
3efed6
 3 files changed, 5 insertions(+), 5 deletions(-)
3efed6
3efed6
diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
3efed6
index beceda52030..1e944a2b671 100644
3efed6
--- a/grub-core/loader/arm/linux.c
3efed6
+++ b/grub-core/loader/arm/linux.c
3efed6
@@ -363,7 +363,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
3efed6
   if (argc == 0)
3efed6
     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
3efed6
 
3efed6
-  file = grub_file_open (argv[0]);
3efed6
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
3efed6
   if (!file)
3efed6
     goto fail;
3efed6
 
3efed6
@@ -408,7 +408,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
3efed6
   if (argc == 0)
3efed6
     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
3efed6
 
3efed6
-  file = grub_file_open (argv[0]);
3efed6
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_INITRD);
3efed6
   if (!file)
3efed6
     return grub_errno;
3efed6
 
3efed6
@@ -471,7 +471,7 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),
3efed6
   if (argc != 1)
3efed6
     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
3efed6
 
3efed6
-  dtb = grub_file_open (argv[0]);
3efed6
+  dtb = grub_file_open (argv[0], GRUB_FILE_TYPE_DEVICE_TREE_IMAGE);
3efed6
   if (!dtb)
3efed6
     return grub_errno;
3efed6
 
3efed6
diff --git a/grub-core/loader/ia64/efi/linux.c b/grub-core/loader/ia64/efi/linux.c
3efed6
index e325fe0ee83..2ad0b0c0407 100644
3efed6
--- a/grub-core/loader/ia64/efi/linux.c
3efed6
+++ b/grub-core/loader/ia64/efi/linux.c
3efed6
@@ -502,7 +502,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
3efed6
       goto fail;
3efed6
     }
3efed6
 
3efed6
-  file = grub_file_open (argv[0]);
3efed6
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
3efed6
   if (! file)
3efed6
     goto fail;
3efed6
 
3efed6
diff --git a/grub-core/loader/sparc64/ieee1275/linux.c b/grub-core/loader/sparc64/ieee1275/linux.c
3efed6
index abe46faa012..bb47ee0cc64 100644
3efed6
--- a/grub-core/loader/sparc64/ieee1275/linux.c
3efed6
+++ b/grub-core/loader/sparc64/ieee1275/linux.c
3efed6
@@ -306,7 +306,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
3efed6
       goto out;
3efed6
     }
3efed6
 
3efed6
-  file = grub_file_open (argv[0]);
3efed6
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
3efed6
   if (!file)
3efed6
     goto out;
3efed6