From: Samuel Thibault Still working on kernel facilities for braille devices, the need for being able to force blanking and unblanking raised: even when a key is pressed, the screen must remain blank, for privacy of the blind user who is typing on the keyboard and reading on its braille terminal. I merely added an ignore_poke variable which is set, and the screen blanked. Then, poke_blanked_console returns immediatly. Upon real unblank (because of an Oops or an explicit tioclinux), ignore_poke is reset to get back to normal operation mode. I had to remove the (unnecessary ?) call to unblank_screen from set_selection to prevent mouse selection unblanking the screen. I also added a way for processes to know whether the screen is blanked (the blind user might hence know whether people can read the screen). 25-akpm/drivers/char/selection.c | 1 - 25-akpm/drivers/char/vt.c | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff -puN drivers/char/selection.c~console-privacy drivers/char/selection.c --- 25/drivers/char/selection.c~console-privacy Tue Jun 3 13:21:33 2003 +++ 25-akpm/drivers/char/selection.c Tue Jun 3 13:21:33 2003 @@ -118,7 +118,6 @@ int set_selection(const unsigned long ar int i, ps, pe; unsigned int currcons = fg_console; - unblank_screen(); poke_blanked_console(); { unsigned short *args, xs, ys, xe, ye; diff -puN drivers/char/vt.c~console-privacy drivers/char/vt.c --- 25/drivers/char/vt.c~console-privacy Tue Jun 3 13:21:33 2003 +++ 25-akpm/drivers/char/vt.c Tue Jun 3 13:22:50 2003 @@ -163,6 +163,12 @@ static void console_callback(void *ignor static int printable; /* Is console ready for printing? */ +/* + * ignore_poke: don't unblank the screen when things are typed. This is + * mainly for the privacy of braille terminal users. + */ +static int ignore_poke; + int do_poke_blanked_console; int console_blanked; @@ -1314,7 +1320,7 @@ static void setterm_command(int currcons case 14: /* set vesa powerdown interval */ vesa_off_interval = ((par[1] < 60) ? par[1] : 60) * 60 * HZ; break; - case 15: /* Activate the previous console */ + case 15: /* activate the previous console */ set_console(last_console); break; } @@ -2282,6 +2288,13 @@ int tioclinux(struct tty_struct *tty, un ret = 0; } break; + case 14: /* blank screen until explicitly unblanked, not only poked */ + ignore_poke = 1; + do_blank_screen(0); + break; + case 15: /* which console is blanked ? */ + ret = console_blanked; + break; default: ret = -EINVAL; break; @@ -2753,6 +2766,7 @@ void unblank_screen(void) { int currcons; + ignore_poke = 0; if (!console_blanked) return; if (!vc_cons_allocated(fg_console)) { @@ -2790,7 +2804,7 @@ static void blank_screen(unsigned long d void poke_blanked_console(void) { del_timer(&console_timer); - if (!vt_cons[fg_console] || vt_cons[fg_console]->vc_mode == KD_GRAPHICS) + if (ignore_poke || !vt_cons[fg_console] || vt_cons[fg_console]->vc_mode == KD_GRAPHICS) return; if (console_blanked) { console_timer.function = unblank_screen_t; _