Control: tags -1 +patch

Here's the obvious patch.

It has an extra bonus of working even when the TERM variable is unset or set
to something that terminfo doesn't recognize.

Please apply before the freeze, if you do we'll be able to flip the default
for CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT two years sooner.


Meow!
-- 
A true bird-watcher waves his tail while doing so.
diff -Nru bash-4.4/debian/clear_console.c bash-4.4/debian/clear_console.c
--- bash-4.4/debian/clear_console.c	2013-10-23 14:41:22.000000000 +0200
+++ bash-4.4/debian/clear_console.c	2016-11-21 21:31:17.000000000 +0100
@@ -172,6 +172,12 @@
   struct vt_stat vtstat;
 #endif
 
+  /* Linux console secure erase (since 2.6.39), this is sufficient there;
+     other terminals silently ignore this code.  If they don't and write junk
+     instead, well, we're clearing the screen anyway.
+   */ 
+  write(1, "\e[3J", 4);
+
   /* clear screen */
   setupterm((char *) 0, 1, (int *) 0);
   if (tputs(clear_screen, lines > 0 ? lines : 1, putch) == ERR)

Reply via email to