From 94c1bd8904ec23566d5a63ad396eb07424df97ee Mon Sep 17 00:00:00 2001 From: Ulf Jordan Date: Tue, 30 Sep 2008 06:13:54 +0000 Subject: Do not try to display non-printable characters on the bootlog and ramdump screens. This fixes unaligned display on serial console. The current isprint() implementation assumes a C locale, so also characters with the eigth bit set are supressed (they produced inconsistant results on VGA and serial anyway). Signed-off-by: Ulf Jordan Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3621 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/coreinfo/ramdump_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'payloads/coreinfo/ramdump_module.c') diff --git a/payloads/coreinfo/ramdump_module.c b/payloads/coreinfo/ramdump_module.c index 019b3d9deb..04a9f0955d 100644 --- a/payloads/coreinfo/ramdump_module.c +++ b/payloads/coreinfo/ramdump_module.c @@ -44,7 +44,8 @@ static void dump_ram(WINDOW *win, uint32_t addr, int row, int col) mvwaddch(win, row + y, col + 76, '|'); } mvwprintw(win, row + y, col + x + 9, "%02x", ptr[i - 1]); - mvwprintw(win, row + y, 62 + count++, "%c", ptr[i - 1]); + mvwprintw(win, row + y, 62 + count++, "%c", + isprint(ptr[i - 1]) ? ptr[i - 1] : ' '); x += 3; if (x == 24) /* One more space after column/byte 8. */ x++; -- cgit v1.2.3