Ulf Jordan wrote:
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 jordan@chalmers.se
Acked-by: Peter Stuge peter@stuge.se
Index: coreinfo/ramdump_module.c
--- coreinfo/ramdump_module.c.orig 2008-09-10 21:32:48.000000000 +0200 +++ coreinfo/ramdump_module.c 2008-09-10 21:34:11.000000000 +0200 @@ -44,7 +44,8 @@ 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",
x += 3; if (x == 24) /* One more space after column/byte 8. */ x++;isprint(ptr[i - 1]) ? ptr[i - 1] : ' ');
Index: coreinfo/bootlog_module.c
--- coreinfo/bootlog_module.c.orig 2008-09-10 21:32:48.000000000 +0200 +++ coreinfo/bootlog_module.c 2008-09-10 21:34:11.000000000 +0200 @@ -63,7 +63,7 @@
/* FIXME: Handle lines longer than 80 characters. */ while (y <= 18) {
mvwaddnstr(win, y + 2, x, tmp, 1);
x++; tmp++; if (*tmp == '\n') {mvwaddch(win, y + 2, x, isprint(*tmp) ? *tmp : ' ');