console: add question-mark escape operator

Some termcaps (found using SLES11SP1) use [? sequences. According to man
console_codes (http://linux.die.net/man/4/console_codes) the question mark
is a nop and should simply be ignored.

This patch does exactly that, rendering screen output readable when
outputting guest serial consoles to the graphical console emulator.

Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Alexander Graf
2011-06-06 06:53:52 +02:00
committed by Andreas Färber
parent 6897c46882
commit 41641ce4e5

View File

@@ -950,7 +950,7 @@ static void console_putchar(QemuConsole *s, int ch)
} else { } else {
if (s->nb_esc_params < MAX_ESC_PARAMS) if (s->nb_esc_params < MAX_ESC_PARAMS)
s->nb_esc_params++; s->nb_esc_params++;
if (ch == ';') if (ch == ';' || ch == '?')
break; break;
#ifdef DEBUG_CONSOLE #ifdef DEBUG_CONSOLE
fprintf(stderr, "escape sequence CSI%d;%d%c, %d parameters\n", fprintf(stderr, "escape sequence CSI%d;%d%c, %d parameters\n",