From: Nicolas Pitre Date: Fri, 1 Oct 2010 04:10:44 +0000 (-0400) Subject: vcs: invoke the vt update callback when /dev/vcs* is written to X-Git-Tag: v2.6.37-rc1~155^2~19 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=432c9ed22aff641039ccd400cdabf983fabc285e;p=karo-tx-linux.git 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 Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman --- 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) } *ppos += written; ret = written; + if (written) + vcs_scr_updated(vc); unlock_out: 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) } } +void vcs_scr_updated(struct vc_data *vc) +{ + notify_update(vc); +} + /* * Visible symbols for modules */ 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); extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org); extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); +extern void vcs_scr_updated(struct vc_data *vc); #endif