From nobody Tue Feb 10 01:16:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505292407236242.2248047749821; Wed, 13 Sep 2017 01:46:47 -0700 (PDT) Received: from localhost ([::1]:40955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3Jm-00022q-Ix for importer@patchew.org; Wed, 13 Sep 2017 04:46:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3EF-0006Cb-22 for qemu-devel@nongnu.org; Wed, 13 Sep 2017 04:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds3E6-0000sp-AR for qemu-devel@nongnu.org; Wed, 13 Sep 2017 04:40:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54012) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds3E6-0000s1-4q for qemu-devel@nongnu.org; Wed, 13 Sep 2017 04:40:54 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 295F87F772; Wed, 13 Sep 2017 08:40:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-51.ams2.redhat.com [10.36.117.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEB7160C17; Wed, 13 Sep 2017 08:40:52 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EDD4F31FC8; Wed, 13 Sep 2017 10:40:51 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 295F87F772 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 13 Sep 2017 10:40:51 +0200 Message-Id: <20170913084051.21378-5-kraxel@redhat.com> In-Reply-To: <20170913084051.21378-1-kraxel@redhat.com> References: <20170913084051.21378-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 13 Sep 2017 08:40:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/4] console: add question-mark escape operator X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Graf , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Alexander Graf 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 Message-id: 20170829113818.42482-1-agraf@suse.de Signed-off-by: Gerd Hoffmann --- ui/console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/console.c b/ui/console.c index f0292d7820..b82c27960a 100644 --- a/ui/console.c +++ b/ui/console.c @@ -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 =3D=3D ';') + if (ch =3D=3D ';' || ch =3D=3D '?') { break; + } trace_console_putchar_csi(s->esc_params[0], s->esc_params[1], ch, s->nb_esc_params); s->state =3D TTY_STATE_NORM; --=20 2.9.3