diff options
author | Karl Dahlke <eklhad@comcast.net> | 2008-04-28 05:14:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:32 -0400 |
commit | 0341a4d0fdd2a0a3d9e2bb3a9afef9f8292c8502 (patch) | |
tree | e073b06ad0d0e4a7d3aaed487db0655feadb31bb /drivers/char | |
parent | f7440b0ecdeb3a04d07c546d02d29700d2a574b7 (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')
-rw-r--r-- | drivers/char/vt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 9b58b894f823..df4c3ead9e2b 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 | |||
2054 | unsigned long draw_from = 0, draw_to = 0; | 2054 | unsigned long draw_from = 0, draw_to = 0; |
2055 | struct vc_data *vc; | 2055 | struct vc_data *vc; |
2056 | unsigned char vc_attr; | 2056 | unsigned char vc_attr; |
2057 | struct vt_notifier_param param; | ||
2057 | uint8_t rescan; | 2058 | uint8_t rescan; |
2058 | uint8_t inverse; | 2059 | uint8_t inverse; |
2059 | uint8_t width; | 2060 | uint8_t width; |
@@ -2113,6 +2114,8 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co | |||
2113 | if (IS_FG(vc)) | 2114 | if (IS_FG(vc)) |
2114 | hide_cursor(vc); | 2115 | hide_cursor(vc); |
2115 | 2116 | ||
2117 | param.vc = vc; | ||
2118 | |||
2116 | while (!tty->stopped && count) { | 2119 | while (!tty->stopped && count) { |
2117 | int orig = *buf; | 2120 | int orig = *buf; |
2118 | c = orig; | 2121 | c = orig; |
@@ -2201,6 +2204,11 @@ rescan_last_byte: | |||
2201 | tc = vc->vc_translate[vc->vc_toggle_meta ? (c | 0x80) : c]; | 2204 | tc = vc->vc_translate[vc->vc_toggle_meta ? (c | 0x80) : c]; |
2202 | } | 2205 | } |
2203 | 2206 | ||
2207 | param.c = tc; | ||
2208 | if (atomic_notifier_call_chain(&vt_notifier_list, VT_PREWRITE, | ||
2209 | ¶m) == NOTIFY_STOP) | ||
2210 | continue; | ||
2211 | |||
2204 | /* If the original code was a control character we | 2212 | /* If the original code was a control character we |
2205 | * only allow a glyph to be displayed if the code is | 2213 | * only allow a glyph to be displayed if the code is |
2206 | * not normally used (such as for cursor movement) or | 2214 | * not normally used (such as for cursor movement) or |