nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0469-util-mkimage-Always-use-grub_host_to_target32-to-ini.patch

468bd4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
468bd4
From: Peter Jones <pjones@redhat.com>
468bd4
Date: Mon, 15 Feb 2021 14:14:24 +0100
468bd4
Subject: [PATCH] util/mkimage: Always use grub_host_to_target32() to
468bd4
 initialize PE stack and heap stuff
468bd4
468bd4
This change does not impact final result of initialization itself.
468bd4
However, it eases PE code unification in subsequent patches.
468bd4
468bd4
Signed-off-by: Peter Jones <pjones@redhat.com>
468bd4
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
468bd4
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
468bd4
---
468bd4
 util/mkimage.c | 8 ++++----
468bd4
 1 file changed, 4 insertions(+), 4 deletions(-)
468bd4
468bd4
diff --git a/util/mkimage.c b/util/mkimage.c
f6e916
index 601521d34..d2876cdb5 100644
468bd4
--- a/util/mkimage.c
468bd4
+++ b/util/mkimage.c
468bd4
@@ -1339,10 +1339,10 @@ grub_install_generate_image (const char *dir, const char *prefix,
468bd4
 	    o->subsystem = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION);
468bd4
 
468bd4
 	    /* Do these really matter? */
468bd4
-	    o->stack_reserve_size = grub_host_to_target64 (0x10000);
468bd4
-	    o->stack_commit_size = grub_host_to_target64 (0x10000);
468bd4
-	    o->heap_reserve_size = grub_host_to_target64 (0x10000);
468bd4
-	    o->heap_commit_size = grub_host_to_target64 (0x10000);
468bd4
+	    o->stack_reserve_size = grub_host_to_target32 (0x10000);
468bd4
+	    o->stack_commit_size = grub_host_to_target32 (0x10000);
468bd4
+	    o->heap_reserve_size = grub_host_to_target32 (0x10000);
468bd4
+	    o->heap_commit_size = grub_host_to_target32 (0x10000);
468bd4
     
468bd4
 	    o->num_data_directories
468bd4
 	      = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES);