From patchwork Mon Aug 28 15:31:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 111172 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5003271qge; Mon, 28 Aug 2017 08:31:41 -0700 (PDT) X-Received: by 10.55.104.214 with SMTP id d205mr1233574qkc.37.1503934301128; Mon, 28 Aug 2017 08:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503934301; cv=none; d=google.com; s=arc-20160816; b=DY3bOWjFbFlwtuf3V2tEl0hFHezg8XMCJqHcNau8cIAnVMCCcSaI4ou1RfD0WAtE58 U3SRVHUosxY/jRLgHsRcMtaZU/cCXbA3zl0oBlveK9qUgVyLhtoQQKZDOK4m2Cr2HUpd 2DXSAfs2zvaqXVg2mS/VIUqShTmL1UPvHYdmdkdIWH55TvHk6XIlImdAXs4Q8kOBwjzh xprGcRYO7z0woWKVkZNgaso4KFu5+0oO4gb/OMjdK8+E9cxgQfryHrZ/FiL+vrdtXLP8 KG3B/TIN196eJYOVU1UmiFM6+cL9rUXV+THsSyExHibbOrF2NeK0ET5RRJs3N5qq5487 x3nA== 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:message-id:date:to:from :arc-authentication-results; bh=cSMa4LzMsrW7dtoBEAO64tHzsUOyukAB2VYRZkmkIII=; b=AOoIDUW92zkhP7cdJye24iJeFZ/jYs9TtK3MLrIlvIzQ0uuwRxKpBe1JfW7crD86CE 40SEwnjT6uIDOMyFPeE462K9+xuWrXcXUfwxlsypA4HoBsuzQ2RFV/CWWJbdZcWDghnU defvzSZEIhR6WiKqApwJIW4YXvpcEyeWATfwKIk1tSDhOwcPWfzknvJlwscZWuMwORni A9XV6LxaYU0NsfI6ecOqyTdt6SZ4bhd9Li1XWahe/jIb4WUl8P3uwNI2CoEkZylJPa+4 oRQnv/7jBzyHwobXj9svpfmA35NXTNTmJxOXJfcuyivL/N2LBYeQoxV+jchHGcgQ2Cw+ zc2g== 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v126si579240qkc.268.2017.08.28.08.31.40 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 28 Aug 2017 08:31:41 -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 Received: from localhost ([::1]:40266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmM0p-00065f-2K for patch@linaro.org; Mon, 28 Aug 2017 11:31:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmM0d-00065N-Ku for qemu-devel@nongnu.org; Mon, 28 Aug 2017 11:31:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmM0Y-0004kb-Kb for qemu-devel@nongnu.org; Mon, 28 Aug 2017 11:31:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:54801 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmM0Y-0004kK-ED for qemu-devel@nongnu.org; Mon, 28 Aug 2017 11:31:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6CD19AC6C; Mon, 28 Aug 2017 15:31:19 +0000 (UTC) From: Alexander Graf To: qemu-devel@nongnu.org Date: Mon, 28 Aug 2017 17:31:18 +0200 Message-Id: <20170828153118.13500-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCH v2] 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- v1 -> v2: - rebase to 2.10 --- ui/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.12.3 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);