Blame SOURCES/0431-grub-core-video-readers-jpeg.c-Use-grub_dprintf-for-.patch

f96e0b
From 830ca107511b53803fbefa89b7c7af0b06c4e337 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Tue, 7 May 2013 11:37:11 +0200
f96e0b
Subject: [PATCH 431/482] 	* grub-core/video/readers/jpeg.c: Use
f96e0b
 grub_dprintf for debug statements 	rather than printf. 	*
f96e0b
 grub-core/video/readers/tga.c: Likewise.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                      | 6 ++++++
f96e0b
 grub-core/video/readers/jpeg.c | 4 +---
f96e0b
 grub-core/video/readers/tga.c  | 6 ++----
f96e0b
 3 files changed, 9 insertions(+), 7 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 0fe18bb..04a2f00 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,11 @@
f96e0b
 2013-05-07  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* grub-core/video/readers/jpeg.c: Use grub_dprintf for debug statements
f96e0b
+	rather than printf.
f96e0b
+	* grub-core/video/readers/tga.c: Likewise.
f96e0b
+
f96e0b
+2013-05-07  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* tests/priority_queue_unit_test.cc: New test.
f96e0b
 
f96e0b
 2013-05-07  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
diff --git a/grub-core/video/readers/jpeg.c b/grub-core/video/readers/jpeg.c
f96e0b
index 33f28c3..0067b7d 100644
f96e0b
--- a/grub-core/video/readers/jpeg.c
f96e0b
+++ b/grub-core/video/readers/jpeg.c
f96e0b
@@ -693,9 +693,7 @@ grub_jpeg_decode_jpeg (struct grub_jpeg_data *data)
f96e0b
       if (grub_errno)
f96e0b
 	break;
f96e0b
 
f96e0b
-#ifdef JPEG_DEBUG
f96e0b
-      grub_printf ("jpeg marker: %x\n", marker);
f96e0b
-#endif
f96e0b
+      grub_dprintf ("jpeg", "jpeg marker: %x\n", marker);
f96e0b
 
f96e0b
       switch (marker)
f96e0b
 	{
f96e0b
diff --git a/grub-core/video/readers/tga.c b/grub-core/video/readers/tga.c
f96e0b
index 84be68a..5aa4c7d 100644
f96e0b
--- a/grub-core/video/readers/tga.c
f96e0b
+++ b/grub-core/video/readers/tga.c
f96e0b
@@ -29,8 +29,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
f96e0b
 /* Uncomment following define to enable TGA debug.  */
f96e0b
 //#define TGA_DEBUG
f96e0b
 
f96e0b
+#define dump_int_field(x) grub_dprintf ("tga", #x " = %d (0x%04x)\n", x, x);
f96e0b
 #if defined(TGA_DEBUG)
f96e0b
-#define dump_int_field(x) grub_printf( #x " = %d (0x%04x)\n", x, x);
f96e0b
 static grub_command_t cmd;
f96e0b
 #endif
f96e0b
 
f96e0b
@@ -347,8 +347,7 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
f96e0b
       return grub_errno;
f96e0b
     }
f96e0b
 
f96e0b
-#if defined(TGA_DEBUG)
f96e0b
-  grub_printf("tga: header\n");
f96e0b
+  grub_dprintf("tga", "tga: header\n");
f96e0b
   dump_int_field(header.id_length);
f96e0b
   dump_int_field(header.color_map_type);
f96e0b
   dump_int_field(header.image_type);
f96e0b
@@ -361,7 +360,6 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
f96e0b
   dump_int_field(header.image_height);
f96e0b
   dump_int_field(header.image_bpp);
f96e0b
   dump_int_field(header.image_descriptor);
f96e0b
-#endif
f96e0b
 
f96e0b
   /* Check that bitmap encoding is supported.  */
f96e0b
   switch (header.image_type)
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b