[coreboot] [PATCH] libpayload: serial output bugfixes

Ulf Jordan jordan at chalmers.se
Sat Aug 9 11:36:23 CEST 2008


The attached patch fixes bold attribute and positioning in libpayload 
serial output. Compile tested against r3478 (latest non-broken 
libpayload+coreinfo) and runtime tested with coreinfo+coreboot-v3 in QEMU 
(serial output in xterm).

-------------- next part --------------
Bugfixes to serial output functions: vt100 has bold with \e[1m,
upper left corner is (0,0) in curses, but (1,1) on the vt100.

Signed-off-by: Ulf Jordan <jordan at chalmers.se>

Index: libpayload/drivers/serial.c
--- libpayload/drivers/serial.c	(revision 3478)
+++ libpayload/drivers/serial.c	(arbetskopia)
@@ -101,7 +101,7 @@
 /*  These are thinly veiled vt100 functions used by curses */
 #define VT100_CLEAR       "\e[H\e[J"
-#define VT100_SBOLD       "\e[7m"
+#define VT100_SBOLD       "\e[1m"
 #define VT100_EBOLD       "\e[m"
 #define VT100_CURSOR_ADDR "\e[%d;%dH"
@@ -129,6 +129,6 @@
 void serial_set_cursor(int y, int x)
 	char buffer[32];
-	snprintf(buffer, sizeof(buffer), VT100_CURSOR_ADDR, y, x);
+	snprintf(buffer, sizeof(buffer), VT100_CURSOR_ADDR, y + 1, x + 1);

More information about the coreboot mailing list