[PATCH] to erase scrollbuffer on ESCc (was: A console_ioctl to erase the scrollbackbuffer)

Marko Schulz (in6x059@public.uni-hamburg.de)
Sat, 11 Sep 1999 18:33:57 +0200


On Tue, Aug 17, 1999 at 11:37:59AM +0200, Pavel Machek wrote:
> I wrote:
> >
> > It would be good to have a ioctl to erase the scrollbackbuffer. This
> > ioctl could be issued (as one possible application) by a small
> > programm, every time a user logs out, so nobody can read afterwards
> > what the user had on the display.
>
> ESCc (console reset) should do that, no need for ioctl().

ACK

> Unfortunately, ESCc does not do that by now. Feel free to
> mail diff -u :-).

What about this one:
--- linux.orig/drivers/char/console.c Sat Sep 11 15:52:40 1999
+++ linux/drivers/char/console.c Sat Sep 11 15:53:30 1999
@@ -1400,8 +1400,10 @@

gotoxy(currcons,0,0);
save_cur(currcons);
- if (do_clear)
+ if (do_clear) {
+ set_origin(currcons);
csi_J(currcons,2);
+ }
}

static void do_con_trol(struct tty_struct *tty, unsigned int currcons, int c)

Could someone test it? I'm not that certain about the
console-thing. It works for me, but I cannot test it under a FB or
something non-intel-x86.

Feedback is welcome.

> > What do you think?
>
> Console reset should reset everything, including scrollback IMO.

Surely.

-- 
marko schulz

"Alles hat man herausgefunden, nur nicht, wie man lebt" Jean Paul Sartre

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/