[PATCH] correct printing to op panel

Mike Strosaker strosake at austin.ibm.com
Wed Jun 1 07:50:58 EST 2005


This patch corrects the printing of progress indicators to the op panel on
ppc64 systems.  Each discrete reference code should begin with a form feed
char to clear the op panel, and the first and second lines should be separated
with a CR/LF sequence.  Padding with spaces is not necessary.

Also, capitalize the hex value printed on the first line, to be consistent
with the values printed by firmware, service processor, etc.

Signed-off-by: Mike Strosaker <strosake at austin.ibm.com>

diff -Nru linux-2.6.12-rc5.orig/arch/ppc64/kernel/pSeries_setup.c linux-2.6.12-rc5/arch/ppc64/kernel/pSeries_setup.c
--- linux-2.6.12-rc5.orig/arch/ppc64/kernel/pSeries_setup.c	2005-05-31 15:35:37.000000000 -0500
+++ linux-2.6.12-rc5/arch/ppc64/kernel/pSeries_setup.c	2005-05-31 15:16:49.000000000 -0500
@@ -240,7 +240,7 @@
 static int __init pSeries_init_panel(void)
 {
 	/* Manually leave the kernel version on the panel. */
-	ppc_md.progress("Linux ppc64\n", 0);
+	ppc_md.progress("\fLinux ppc64\r\n", 0);
 	ppc_md.progress(UTS_RELEASE, 0);
 
 	return 0;
diff -Nru linux-2.6.12-rc5.orig/arch/ppc64/kernel/setup.c linux-2.6.12-rc5/arch/ppc64/kernel/setup.c
--- linux-2.6.12-rc5.orig/arch/ppc64/kernel/setup.c	2005-05-31 15:35:37.000000000 -0500
+++ linux-2.6.12-rc5/arch/ppc64/kernel/setup.c	2005-05-31 15:17:10.000000000 -0500
@@ -1085,9 +1085,9 @@
 	if (ppc_md.progress) {
 		char buf[32];
 
-		sprintf(buf, "%08x        \n", src);
+		sprintf(buf, "\f%08X\r\n", src);
 		ppc_md.progress(buf, 0);
-		sprintf(buf, "%-16s", msg);
+		snprintf(buf, 32, "%s", msg);
 		ppc_md.progress(buf, 0);
 	}
 }





More information about the Linuxppc64-dev mailing list