Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754655AbcKUURT (ORCPT ); Mon, 21 Nov 2016 15:17:19 -0500 Received: from tartarus.angband.pl ([89.206.35.136]:58364 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754214AbcKUURR (ORCPT ); Mon, 21 Nov 2016 15:17:17 -0500 Date: Mon, 21 Nov 2016 21:17:04 +0100 From: Adam Borowski To: Manuel =?iso-8859-1?Q?Sch=F6lling?= Cc: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, jslaby@suse.cz, gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, andrey_utkin@fastmail.com Subject: Re: [PATCH v5 2/2] console: Add persistent scrollback buffers for all VGA consoles Message-ID: <20161121201704.GA29655@angband.pl> References: <20161118005309.GC26324@dell-m4800.home> <1479679088-3015-1-git-send-email-manuel.schoelling@gmx.de> <1479679088-3015-3-git-send-email-manuel.schoelling@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1479679088-3015-3-git-send-email-manuel.schoelling@gmx.de> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1549 Lines: 38 On Sun, Nov 20, 2016 at 10:58:08PM +0100, Manuel Sch?lling wrote: > Add a scrollback buffers for each VGA console. The benefit is that > the scrollback history is not flushed when switching between consoles > but is persistent. > The buffers are allocated on demand when a new console is opened. > > This breaks tools like clear_console that rely on flushing the > scrollback history by switching back and forth between consoles > which is why this feature is disabled by default. > Use the escape sequence \e[3J instead for flushing the buffer. > > Signed-off-by: Manuel Sch?lling > --- First, big thanks for this fix, it's something that greatly annoyed me since forever! The thing about clear_console is unfortunate: they abused the bug you're fixing. I've asked to use \e[3J (https://bugs.debian.org/845177) so there's hope it'll be applied in stretch; with Debian configuring its glibc to support only kernels from two releases before (in jessie that's 2.6.32, in stretch 3.2)[1] there's hope we can flip the default in several years. Do you suspect any other program relies on VT switch to clear the scrollback? But alas, this commit breaks that very \e[3J. It does only a \e[2J, leaving the scrollback uncleared. For comparison, both mainline and with just your preparatory commit, \e[3J works as expected. Meow! [1]. Well, the dependency goes the other way, but suggestions I'm intentionally making this error to push an agenda are evil lies. :p -- A true bird-watcher waves his tail while doing so.