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

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