Blame SOURCES/0429-grub-core-font-font.c-Use-grub_dprintf-for-debug-sta.patch

f96e0b
From d6dce4fe955c1672456d0651c20c7b810e9b36c9 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Tue, 7 May 2013 11:26:15 +0200
f96e0b
Subject: [PATCH 429/482] 	* grub-core/font/font.c: Use grub_dprintf for
f96e0b
 debug statements rather 	than printf.
f96e0b
f96e0b
---
f96e0b
 ChangeLog             |  5 +++++
f96e0b
 grub-core/font/font.c | 28 ++++++++++++++--------------
f96e0b
 2 files changed, 19 insertions(+), 14 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 16c5404..0fa3be0 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,3 +1,8 @@
f96e0b
+2013-05-07  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
+	* grub-core/font/font.c: Use grub_dprintf for debug statements rather
f96e0b
+	than printf.
f96e0b
+
f96e0b
 2013-05-06  Andrey Borzenkov <arvidjaar@gmail.com>
f96e0b
 
f96e0b
 	Reimplement grub-reboot to not depend on saved_entry. Use next_entry
f96e0b
diff --git a/grub-core/font/font.c b/grub-core/font/font.c
f96e0b
index 50b1799..3a380b9 100644
f96e0b
--- a/grub-core/font/font.c
f96e0b
+++ b/grub-core/font/font.c
f96e0b
@@ -293,7 +293,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
f96e0b
   grub_uint32_t last_code;
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 2
f96e0b
-  grub_printf ("load_font_index(sect_length=%d)\n", sect_length);
f96e0b
+  grub_dprintf ("font", "load_font_index(sect_length=%d)\n", sect_length);
f96e0b
 #endif
f96e0b
 
f96e0b
   /* Sanity check: ensure section length is divisible by the entry size.  */
f96e0b
@@ -321,7 +321,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
f96e0b
 
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 2
f96e0b
-  grub_printf ("num_chars=%d)\n", font->num_chars);
f96e0b
+  grub_dprintf ("font", "num_chars=%d)\n", font->num_chars);
f96e0b
 #endif
f96e0b
 
f96e0b
   last_code = 0;
f96e0b
@@ -365,7 +365,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
f96e0b
 #if FONT_DEBUG >= 5
f96e0b
       /* Print the 1st 10 characters.  */
f96e0b
       if (i < 10)
f96e0b
-	grub_printf ("c=%d o=%d\n", entry->code, entry->offset);
f96e0b
+	grub_dprintf ("font", "c=%d o=%d\n", entry->code, entry->offset);
f96e0b
 #endif
f96e0b
     }
f96e0b
 
f96e0b
@@ -431,7 +431,7 @@ grub_font_load (const char *filename)
f96e0b
   grub_font_t font = 0;
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 1
f96e0b
-  grub_printf ("add_font(%s)\n", filename);
f96e0b
+  grub_dprintf ("font", "add_font(%s)\n", filename);
f96e0b
 #endif
f96e0b
 
f96e0b
   if (filename[0] == '(' || filename[0] == '/' || filename[0] == '+')
f96e0b
@@ -462,7 +462,7 @@ grub_font_load (const char *filename)
f96e0b
     goto fail;
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-  grub_printf ("file opened\n");
f96e0b
+  grub_dprintf ("font", "file opened\n");
f96e0b
 #endif
f96e0b
 
f96e0b
   /* Read the FILE section.  It indicates the file format.  */
f96e0b
@@ -470,7 +470,7 @@ grub_font_load (const char *filename)
f96e0b
     goto fail;
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-  grub_printf ("opened FILE section\n");
f96e0b
+  grub_dprintf ("font", "opened FILE section\n");
f96e0b
 #endif
f96e0b
   if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_FILE,
f96e0b
 		   sizeof (FONT_FORMAT_SECTION_NAMES_FILE) - 1) != 0)
f96e0b
@@ -481,7 +481,7 @@ grub_font_load (const char *filename)
f96e0b
     }
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-  grub_printf ("section name ok\n");
f96e0b
+  grub_dprintf ("font", "section name ok\n");
f96e0b
 #endif
f96e0b
   if (section.length != 4)
f96e0b
     {
f96e0b
@@ -492,14 +492,14 @@ grub_font_load (const char *filename)
f96e0b
     }
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-  grub_printf ("section length ok\n");
f96e0b
+  grub_dprintf ("font", "section length ok\n");
f96e0b
 #endif
f96e0b
   /* Check the file format type code.  */
f96e0b
   if (grub_file_read (file, magic, 4) != 4)
f96e0b
     goto fail;
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-  grub_printf ("read magic ok\n");
f96e0b
+  grub_dprintf ("font", "read magic ok\n");
f96e0b
 #endif
f96e0b
 
f96e0b
   if (grub_memcmp (magic, FONT_FORMAT_PFF2_MAGIC, 4) != 0)
f96e0b
@@ -510,7 +510,7 @@ grub_font_load (const char *filename)
f96e0b
     }
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-  grub_printf ("compare magic ok\n");
f96e0b
+  grub_dprintf ("font", "compare magic ok\n");
f96e0b
 #endif
f96e0b
 
f96e0b
   /* Allocate the font object.  */
f96e0b
@@ -522,7 +522,7 @@ grub_font_load (const char *filename)
f96e0b
   font->file = file;
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-  grub_printf ("allocate font ok; loading font info\n");
f96e0b
+  grub_dprintf ("font", "allocate font ok; loading font info\n");
f96e0b
 #endif
f96e0b
 
f96e0b
   /* Load the font information.  */
f96e0b
@@ -537,7 +537,7 @@ grub_font_load (const char *filename)
f96e0b
 	}
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 2
f96e0b
-      grub_printf ("opened section %c%c%c%c ok\n",
f96e0b
+      grub_dprintf ("font", "opened section %c%c%c%c ok\n",
f96e0b
 		   section.name[0], section.name[1],
f96e0b
 		   section.name[2], section.name[3]);
f96e0b
 #endif
f96e0b
@@ -621,7 +621,7 @@ grub_font_load (const char *filename)
f96e0b
 	{
f96e0b
 	  /* Unhandled section type, simply skip past it.  */
f96e0b
 #if FONT_DEBUG >= 3
f96e0b
-	  grub_printf ("Unhandled section type, skipping.\n");
f96e0b
+	  grub_dprintf ("font", "Unhandled section type, skipping.\n");
f96e0b
 #endif
f96e0b
 	  grub_off_t section_end = grub_file_tell (file) + section.length;
f96e0b
 	  if ((int) grub_file_seek (file, section_end) == -1)
f96e0b
@@ -636,7 +636,7 @@ grub_font_load (const char *filename)
f96e0b
     }
f96e0b
 
f96e0b
 #if FONT_DEBUG >= 1
f96e0b
-  grub_printf ("Loaded font `%s'.\n"
f96e0b
+  grub_dprintf ("font", "Loaded font `%s'.\n"
f96e0b
 	       "Ascent=%d Descent=%d MaxW=%d MaxH=%d Number of characters=%d.\n",
f96e0b
 	       font->name,
f96e0b
 	       font->ascent, font->descent,
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b