Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94106
b: refs/heads/master
c: 0341a4d
h: refs/heads/master
v: v3
  • Loading branch information
Karl Dahlke authored and Linus Torvalds committed Apr 28, 2008
1 parent 311ac57 commit 617a593
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7440b0ecdeb3a04d07c546d02d29700d2a574b7
refs/heads/master: 0341a4d0fdd2a0a3d9e2bb3a9afef9f8292c8502
8 changes: 8 additions & 0 deletions trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2201,6 +2204,11 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
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
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ extern struct blocking_notifier_head reboot_notifier_list;
#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 */

0 comments on commit 617a593

Please sign in to comment.