hush: Fix printf debug macro in hush.c so that it usable in U-Boot
PATCH v2 1/1 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 <[email protected]>
---
v2: Fix comment
common/hush.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
common/hush.c +6 -2
@@ -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, ...) { }
Signature · 1 line
1.5.6.5
Wolfgang Denk
AppliedPATCH v2 1/1 hush: Fix printf debug macro in hush.c so that it usable in U-Boot
Dear Stefan Roese,
Quoted 10 lines · In message <[email protected]> you wrote:
This patch changes the
debug_printf()marco for U-Boot inhush.cand moves the definition ofDEBUG_SHELLto a place that is actually compiled under U-Boot.Signed-off-by Stefan Roese <[email protected]>---
v2: Fix commentcommon/hush.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You Earth people glorified organized violence for forty centuries. But you imprison those who employ it privately. -- Spock, "Dagger of the Mind", stardate 2715.1