summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-08-19 14:57:55 +0200
committerWolfgang Denk <wd@denx.de>2008-08-21 02:05:03 +0200
commit4cacf7c64609839f809e2f9c45873f1d65861703 (patch)
treeb1bf8641eca9f647aa4503ba944894d7a4f88235
parent8f2b457ef26a44d9e5fd7d6b16c394e5c3a71ca2 (diff)
downloadu-boot-imx-4cacf7c64609839f809e2f9c45873f1d65861703.zip
u-boot-imx-4cacf7c64609839f809e2f9c45873f1d65861703.tar.gz
u-boot-imx-4cacf7c64609839f809e2f9c45873f1d65861703.tar.bz2
hush: Fix printf debug macro in hush.c so that it usable in U-Boot
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 <sr@denx.de>
-rw-r--r--common/hush.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/hush.c b/common/hush.c
index 75c18ce..093c428 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_SHELL 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, ...) { }