LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] VT notifier extension for accessibility
@ 2008-02-15 17:25 Samuel Thibault
2008-02-23 8:07 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2008-02-15 17:25 UTC (permalink / raw)
To: linux-kernel, linuxconsole-dev
Some accessibility modules need to be able to catch the output on the
console before the VT interpretation, and possibly swallow it.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
From: Karl Dahlke <eklhad@comcast.net>
--- include/linux/notifier.h 2008-02-15 08:44:10.000000000 -0500
+++ include/linux/notifier.h.new 2008-02-15 09:58:00.000000000 -0500
@@ -247,6 +247,7 @@ extern struct blocking_notifier_head reb
#define VT_DEALLOCATE 0x0002 /* Console will be deallocated */
#define VT_WRITE 0x0003 /* A char got output */
#define VT_UPDATE 0x0004 /* A bigger update occurred */
+#define VT_PREWRITE 0x0005 /* A char is about to be written to the console */
#endif /* __KERNEL__ */
#endif /* _LINUX_NOTIFIER_H */
--- drivers/char/vt.c 2008-02-15 08:43:35.000000000 -0500
+++ drivers/char/vt.c.new 2008-02-15 10:11:14.000000000 -0500
@@ -2053,6 +2053,7 @@ static int do_con_write(struct tty_struc
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;
@@ -2112,6 +2113,8 @@ static int do_con_write(struct tty_struc
if (IS_FG(vc))
hide_cursor(vc);
+ param.vc = vc;
+
while (!tty->stopped && count) {
int orig = *buf;
c = orig;
@@ -2200,6 +2203,10 @@ 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, ¶m) == 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] VT notifier extension for accessibility
2008-02-15 17:25 [PATCH] VT notifier extension for accessibility Samuel Thibault
@ 2008-02-23 8:07 ` Andrew Morton
2008-02-23 13:47 ` Samuel Thibault
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-02-23 8:07 UTC (permalink / raw)
To: Samuel Thibault; +Cc: linux-kernel, linuxconsole-dev
On Fri, 15 Feb 2008 18:25:16 +0100 Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> Some accessibility modules need to be able to catch the output on the
> console before the VT interpretation, and possibly swallow it.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> From: Karl Dahlke <eklhad@comcast.net>
Please put the From: at the very top of the changelog when providing
attribution.
Did we have a signed-off-by: from Karl?
> --- include/linux/notifier.h 2008-02-15 08:44:10.000000000 -0500
> +++ include/linux/notifier.h.new 2008-02-15 09:58:00.000000000 -0500
Please prepare patches in `patch -p1' form, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] VT notifier extension for accessibility
2008-02-23 8:07 ` Andrew Morton
@ 2008-02-23 13:47 ` Samuel Thibault
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2008-02-23 13:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linuxconsole-dev
Andrew Morton, le Sat 23 Feb 2008 00:07:13 -0800, a écrit :
> Did we have a signed-off-by: from Karl?
He didn't give any.
Samuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-23 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 17:25 [PATCH] VT notifier extension for accessibility Samuel Thibault
2008-02-23 8:07 ` Andrew Morton
2008-02-23 13:47 ` Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).