]> Git Repo - qemu.git/commitdiff
console: add question-mark escape operator
authorAlexander Graf <[email protected]>
Tue, 29 Aug 2017 11:38:18 +0000 (13:38 +0200)
committerGerd Hoffmann <[email protected]>
Wed, 13 Sep 2017 08:17:26 +0000 (10:17 +0200)
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 <[email protected]>
Message-id: 20170829113818[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
ui/console.c

index f0292d7820e81c0d533371323770d287dc69e492..b82c27960a3f667a63159f696067b732da6b32ca 100644 (file)
@@ -880,8 +880,9 @@ static void console_putchar(QemuConsole *s, int ch)
         } else {
             if (s->nb_esc_params < MAX_ESC_PARAMS)
                 s->nb_esc_params++;
-            if (ch == ';')
+            if (ch == ';' || ch == '?') {
                 break;
+            }
             trace_console_putchar_csi(s->esc_params[0], s->esc_params[1],
                                       ch, s->nb_esc_params);
             s->state = TTY_STATE_NORM;
This page took 0.02919 seconds and 4 git commands to generate.