From patchwork Wed Sep 13 08:40:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 112412 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp694307qgf; Wed, 13 Sep 2017 01:46:10 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBowE68CddoNf2u8OpaUSFqz2IipacaK6qqqC4Q51JsEKe3TB7KhGKISdOKgSWxz+JdeKZK X-Received: by 10.237.44.34 with SMTP id f31mr1744516qtd.252.1505292370140; Wed, 13 Sep 2017 01:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505292370; cv=none; d=google.com; s=arc-20160816; b=lsvcxe4Es6l0huYho1xgsulTmsbwHZZoDm0kuwZSWzvua8B+fAHltaflOxcafatH6+ 13nYbOwn7Q2Y9h2CrlpAdTn5UCEaeGhYxWmdqE3z8u1aNb5aRlEWw4VEcbKKjd8CQiyI xun7DT1mtOUJ7spw3G9YwS5IhtEaJHeuql1T+zcTHStBI8LmPkWchNUIRpwLOe4m6wDl 4UMfqz4tqYAEUSkmxcuUjYFWUTX3IsGxf+PSHbwZyg3m8DMMusRZU1ZPJWyFGbbhpn9w r/KIRdNi5B4k5kl6jgHVLaMz+ueubWHyvqI9qJ6/8pDzMpWVhJIsRAN7Y/WLqE3cG0TP Ls2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dmarc-filter:arc-authentication-results; bh=uV78A4RJ55DJuRovBrLu3wtmqJWlEYlrP/4bvBd7PlE=; b=G8i3iBqURMu0cNFO11P/F4Poi1jmswNq1weP9/XDWAZga5sj3eDBEOielx+H3m/Nz2 l46KLScaijPN4X3ljgxUVLQI5mOPO8yU9GMyT7LPD0GXZTa2DXLKyisqFGPQd1O3E776 XgVL0S9Qj2beFhqRa0jiJUlgzLte9UIJ4DZRCHHMp6cc6czrrJE0BT/1a5qxRNNFoVnc IhUjyzyIxldoobVAOxML5I2fWRE0Ridjkouj3fEejcl9qgg1HmCsVo2mmn686DQmkYKS tSu7xVvEFEWnsjD/joFClCJnfxdhxbmjp3Ngyh4j6e471eeabDaBErS/cjbsHWD7vXL4 1Grg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p67si13853517qkf.288.2017.09.13.01.46.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 13 Sep 2017 01:46:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:40954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3JA-0001hU-5D for patch@linaro.org; Wed, 13 Sep 2017 04:46:08 -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) 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 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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.9.3 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 == ';') + 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;