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

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