This patch changes the debug_printf() marco for U-Boot in hush.c and
moves the definition of DEBUG_SHELL to a place that is actually compiled
under U-Boot.

Signed-off-by: Stefan Roese <[EMAIL PROTECTED]>
---
 common/hush.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/hush.c b/common/hush.c
index 75c18ce..a104a0d 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -115,7 +115,6 @@ extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, 
char *argv[]);      /
 #include <signal.h>
 
 /* #include <dmalloc.h> */
-/* #define DEBUG_SHELL */
 
 #if 1
 #include "busybox.h"
@@ -360,6 +359,11 @@ struct built_in_command {
 };
 #endif
 
+/* define DEBUG for debugging output (obviously ;-)) */
+#if 0
+#define DEBUG_SHELL
+#endif
+
 /* This should be in utility.c */
 #ifdef DEBUG_SHELL
 #ifndef __U_BOOT__
@@ -371,7 +375,7 @@ static void debug_printf(const char *format, ...)
        va_end(args);
 }
 #else
-#define debug_printf printf             /* U-Boot debug flag */
+#define debug_printf(fmt,args...)      printf (fmt ,##args)
 #endif
 #else
 static inline void debug_printf(const char *format, ...) { }
-- 
1.5.6.5


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to