dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0372-arm64-xen-Fix-too-few-arguments-to-function-grub_cre.patch

5975ab
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5975ab
From: Lee Jones <lee.jones@linaro.org>
5975ab
Date: Tue, 20 Nov 2018 10:45:04 +0000
5975ab
Subject: [PATCH] arm64/xen: Fix too few arguments to function
5975ab
 grub_create_loader_cmdline()
5975ab
MIME-Version: 1.0
5975ab
Content-Type: text/plain; charset=UTF-8
5975ab
Content-Transfer-Encoding: 8bit
5975ab
5975ab
Without this fix, building xen_boot.c omits:
5975ab
5975ab
loader/arm64/xen_boot.c: In function ‘xen_boot_binary_load’:
5975ab
loader/arm64/xen_boot.c:370:7: error: too few arguments to function ‘grub_create_loader_cmdline’
5975ab
       grub_create_loader_cmdline (argc - 1, argv + 1, binary->cmdline,
5975ab
       ^~~~~~~~~~~~~~~~~~~~~~~~~~
5975ab
In file included from loader/arm64/xen_boot.c:36:0:
5975ab
../include/grub/lib/cmdline.h:29:12: note: declared here
5975ab
 grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,
5975ab
5975ab
Signed-off-by: Lee Jones <lee.jones@linaro.org>
5975ab
Reviewed-by: Julien Grall <julien.grall@arm.com>
5975ab
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
5975ab
---
5975ab
 grub-core/loader/arm64/xen_boot.c | 3 ++-
5975ab
 1 file changed, 2 insertions(+), 1 deletion(-)
5975ab
5975ab
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
5975ab
index 318c833de57..1a337866f08 100644
5975ab
--- a/grub-core/loader/arm64/xen_boot.c
5975ab
+++ b/grub-core/loader/arm64/xen_boot.c
5975ab
@@ -367,7 +367,8 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file,
5975ab
 	  return;
5975ab
 	}
5975ab
       grub_create_loader_cmdline (argc - 1, argv + 1, binary->cmdline,
5975ab
-				  binary->cmdline_size);
5975ab
+				  binary->cmdline_size,
5975ab
+				  GRUB_VERIFY_KERNEL_CMDLINE);
5975ab
       grub_dprintf ("xen_loader",
5975ab
 		    "Xen_boot cmdline @ %p %s, size: %d\n",
5975ab
 		    binary->cmdline, binary->cmdline, binary->cmdline_size);