aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pitre <nico@fluxnic.net>2010-10-01 00:10:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:20:06 -0400
commit432c9ed22aff641039ccd400cdabf983fabc285e (patch)
treed4f458dfad838e93442a5ebbb3486113c8f77631
parent47725ac76f51328d467b1430dfd027aba8706a11 (diff)
vcs: invoke the vt update callback when /dev/vcs* is written to
A notifier chain is called whenever the vt code modifies a terminal content, except for one case which is when the modification comes through writes to /dev/vcs* devices. Let's add the missing notifier invocation at the end of vcs_write() for that case too. Signed-off-by: Nicolas Pitre <nicolas.pitre@canonical.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/char/vc_screen.c2
-rw-r--r--drivers/char/vt.c5
-rw-r--r--include/linux/selection.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 6f7054e1a516..273ab44cc91d 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -538,6 +538,8 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
538 } 538 }
539 *ppos += written; 539 *ppos += written;
540 ret = written; 540 ret = written;
541 if (written)
542 vcs_scr_updated(vc);
541 543
542unlock_out: 544unlock_out:
543 release_console_sem(); 545 release_console_sem();
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 281aada7b4a1..a8ec48ed14d9 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -4182,6 +4182,11 @@ void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org)
4182 } 4182 }
4183} 4183}
4184 4184
4185void vcs_scr_updated(struct vc_data *vc)
4186{
4187 notify_update(vc);
4188}
4189
4185/* 4190/*
4186 * Visible symbols for modules 4191 * Visible symbols for modules
4187 */ 4192 */
diff --git a/include/linux/selection.h b/include/linux/selection.h
index 8cdaa1151d2e..85193aa8c1e3 100644
--- a/include/linux/selection.h
+++ b/include/linux/selection.h
@@ -39,5 +39,6 @@ extern void putconsxy(struct vc_data *vc, unsigned char *p);
39 39
40extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org); 40extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org);
41extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); 41extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org);
42extern void vcs_scr_updated(struct vc_data *vc);
42 43
43#endif 44#endif