diff mbox series

[v2] console: add question-mark escape operator

Message ID 20170828153118.13500-1-agraf@suse.de
State New
Headers show
Series [v2] console: add question-mark escape operator | expand

Commit Message

Alexander Graf Aug. 28, 2017, 3:31 p.m. UTC
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>

---

v1 -> v2:

  - rebase to 2.10
---
 ui/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

no-reply@patchew.org Aug. 28, 2017, 3:33 p.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20170828153118.13500-1-agraf@suse.de
Subject: [Qemu-devel] [PATCH v2] console: add question-mark escape operator
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20170828153118.13500-1-agraf@suse.de -> patchew/20170828153118.13500-1-agraf@suse.de
Switched to a new branch 'test'
bc8fdb40b2 console: add question-mark escape operator

=== OUTPUT BEGIN ===
Checking PATCH 1/1: console: add question-mark escape operator...
ERROR: braces {} are necessary for all arms of this statement
#26: FILE: ui/console.c:883:
+            if (ch == ';' || ch == '?')
[...]

total: 1 errors, 0 warnings, 8 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index d2d3534c49..c28e19c375 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -880,7 +880,7 @@  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);