zbyszek / rpms / grub2

Forked from rpms/grub2 5 years ago
Clone
31004e6
From 8e89166d92a09ac82788747a6b3da734d97dae3f Mon Sep 17 00:00:00 2001
31004e6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
31004e6
Date: Sat, 20 Apr 2013 13:39:04 +0200
f74b50e
Subject: [PATCH 330/482] 	* grub-core/lib/efi/relocator.c
31004e6
 (grub_relocator_firmware_alloc_region): 	Remove dprintf. 	*
31004e6
 grub-core/lib/relocator.c (malloc_in_range): Likewise.
31004e6
31004e6
---
31004e6
 ChangeLog                     | 6 ++++++
31004e6
 grub-core/lib/efi/relocator.c | 4 ++--
31004e6
 grub-core/lib/relocator.c     | 2 ++
31004e6
 3 files changed, 10 insertions(+), 2 deletions(-)
31004e6
31004e6
diff --git a/ChangeLog b/ChangeLog
31004e6
index 3e606cb..6ca70a6 100644
31004e6
--- a/ChangeLog
31004e6
+++ b/ChangeLog
31004e6
@@ -1,3 +1,9 @@
31004e6
+2013-04-20  Vladimir Serbinenko  <phcoder@gmail.com>
31004e6
+
31004e6
+	* grub-core/lib/efi/relocator.c (grub_relocator_firmware_alloc_region):
31004e6
+	Remove dprintf.
31004e6
+	* grub-core/lib/relocator.c (malloc_in_range): Likewise.
31004e6
+
31004e6
 2013-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
31004e6
 
31004e6
 	* grub-core/kern/ieee1275/init.c (grub_claim_heap): Improve handling
31004e6
diff --git a/grub-core/lib/efi/relocator.c b/grub-core/lib/efi/relocator.c
31004e6
index 0d346be..319b69e 100644
31004e6
--- a/grub-core/lib/efi/relocator.c
31004e6
+++ b/grub-core/lib/efi/relocator.c
31004e6
@@ -96,10 +96,10 @@ grub_relocator_firmware_alloc_region (grub_addr_t start, grub_size_t size)
31004e6
 
31004e6
   if (grub_efi_is_finished)
31004e6
     return 1;
31004e6
-
31004e6
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
31004e6
   grub_dprintf ("relocator", "EFI alloc: %llx, %llx\n",
31004e6
 		(unsigned long long) start, (unsigned long long) size);
31004e6
-
31004e6
+#endif
31004e6
   b = grub_efi_system_table->boot_services;
31004e6
   status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ADDRESS,
31004e6
 		       GRUB_EFI_LOADER_DATA, size >> 12, &address);
31004e6
diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
31004e6
index 350066d..e085514 100644
31004e6
--- a/grub-core/lib/relocator.c
31004e6
+++ b/grub-core/lib/relocator.c
31004e6
@@ -984,9 +984,11 @@ malloc_in_range (struct grub_relocator *rel,
31004e6
 	    alloc_end = min (events[j].pos, target + size);
31004e6
 	    if (alloc_end > alloc_start)
31004e6
 	      {
31004e6
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
31004e6
 		grub_dprintf ("relocator", "subchunk 0x%lx-0x%lx, %d\n",
31004e6
 			      (unsigned long) alloc_start,
31004e6
 			      (unsigned long) alloc_end, typepre);
31004e6
+#endif
31004e6
 		curschu->type = typepre;
31004e6
 		curschu->start = alloc_start;
31004e6
 		curschu->size = alloc_end - alloc_start;
31004e6
-- 
31004e6
1.8.2.1
31004e6