]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
arm-uboot, ia64, sparc64: Fix up grub_file_open() calls
authorLeif Lindholm <leif.lindholm@linaro.org>
Wed, 14 Nov 2018 19:29:19 +0000 (19:29 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 16 Nov 2018 13:42:51 +0000 (14:42 +0100)
The verifiers framework changed the grub_file_open() interface, breaking all
non-x86 linux loaders. Add file types to the grub_file_open() calls to make
them build again.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/arm/linux.c
grub-core/loader/ia64/efi/linux.c
grub-core/loader/sparc64/ieee1275/linux.c

index 80293fb1fc44b8270cc2aac288acd51cb2ce8b48..67ed79359ce7a66defad16d35c2ed02eab376809 100644 (file)
@@ -363,7 +363,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
   if (argc == 0)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
   if (!file)
     goto fail;
 
@@ -408,7 +408,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
   if (argc == 0)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_INITRD);
   if (!file)
     return grub_errno;
 
@@ -471,7 +471,7 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),
   if (argc != 1)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
 
-  dtb = grub_file_open (argv[0]);
+  dtb = grub_file_open (argv[0], GRUB_FILE_TYPE_DEVICE_TREE_IMAGE);
   if (!dtb)
     return grub_errno;
 
index 6477d70f0028fdbea13502bb9b52bc46bb3d03b6..639a1f379b6059aa991f6733f8ff2cd2233c6a1b 100644 (file)
@@ -460,7 +460,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
       goto fail;
     }
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
   if (! file)
     goto fail;
 
index abe46faa0126aa88eb3f79f91019cef8849c99cc..bb47ee0cc6407a638bf2fe4c4e893ab880160f41 100644 (file)
@@ -306,7 +306,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
       goto out;
     }
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
   if (!file)
     goto out;