Thread (10 messages) 10 messages, 4 authors, 2016-11-16

Re: [PATCH v3] console: Add persistent scrollback buffers for all VGA consoles

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2016-09-27 10:58:47
Also in: lkml

On Mon, Sep 19, 2016 at 12:06:57AM +0200, 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.

It always annoys me when I switch back to a console and I can just
read half of an error backtrace. This should fix issues like these.

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 <redacted>
---
Changes in v3:
  - Add config option for this feature
  - Fallback to old scrollback buffer if kcalloc() fails
  - Remove ioctl() call again and add documentation about existing
    escape sequence to flush the scrollback buffer
Changes in v2:
  - Add ioctl() call to flush scrollback buffer
  - (Patch v2 was not labeled as such, sorry)
---
 drivers/video/console/Kconfig  |  23 +++++-
 drivers/video/console/vgacon.c | 160 +++++++++++++++++++++++++++--------------
 2 files changed, 128 insertions(+), 55 deletions(-)
I need someone else to at least test this, and give an acked-by for
it...

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help