[PATCH] Update udbg_progress() to display the integer

Timur Tabi timur at freescale.com
Tue Feb 6 06:51:55 EST 2007


Although udbg_progress() takes a string and a short as parameters, only
the string is displayed.  This patch also displays the integer, if it's not
equal to 0xFFFF.  This gives callers the option to display only the string.

Signed-off-by: Timur Tabi <timur at freescale.com>
---
 arch/powerpc/kernel/udbg.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 5730906..c474961 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -121,6 +121,11 @@ void udbg_printf(const char *fmt, ...)
 void __init udbg_progress(char *s, unsigned short hex)
 {
 	udbg_puts(s);
+	if (hex != 0xffff) {
+		char buf[8];
+		sprintf(buf, " : %04X", hex);
+		udbg_puts(buf);
+	}
 	udbg_puts("\n");
 }
 
-- 
1.4.4




More information about the Linuxppc-dev mailing list