summaryrefslogtreecommitdiffstats
path: root/drivers/char/vt.c
diff options
context:
space:
mode:
authorKarl Dahlke <eklhad@comcast.net>2008-04-28 02:14:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 08:58:32 -0700
commit0341a4d0fdd2a0a3d9e2bb3a9afef9f8292c8502 (patch)
treee073b06ad0d0e4a7d3aaed487db0655feadb31bb /drivers/char/vt.c
parentf7440b0ecdeb3a04d07c546d02d29700d2a574b7 (diff)
VT notifier extension for accessibility
Some accessibility modules need to be able to catch the output on the console before the VT interpretation, and possibly swallow it. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r--drivers/char/vt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 9b58b894f82..df4c3ead9e2 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2054,6 +2054,7 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
unsigned long draw_from = 0, draw_to = 0;
struct vc_data *vc;
unsigned char vc_attr;
+ struct vt_notifier_param param;
uint8_t rescan;
uint8_t inverse;
uint8_t width;
@@ -2113,6 +2114,8 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
if (IS_FG(vc))
hide_cursor(vc);
+ param.vc = vc;
+
while (!tty->stopped && count) {
int orig = *buf;
c = orig;
@@ -2201,6 +2204,11 @@ rescan_last_byte:
tc = vc->vc_translate[vc->vc_toggle_meta ? (c | 0x80) : c];
}
+ param.c = tc;
+ if (atomic_notifier_call_chain(&vt_notifier_list, VT_PREWRITE,
+ &param) == NOTIFY_STOP)
+ continue;
+
/* If the original code was a control character we
* only allow a glyph to be displayed if the code is
* not normally used (such as for cursor movement) or