* [PATCH 2/2] vcs: invoke the vt update callback when /dev/vcs* is written to
@ 2010-10-01 4:10 Nicolas Pitre
2010-10-05 23:18 ` patch "vcs: invoke the vt update callback when /dev/vcs* is written to" added to gregkh-2.6 tree gregkh
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Pitre @ 2010-10-01 4:10 UTC (permalink / raw)
To: lkml; +Cc: Greg Kroah-Hartman, Andrew Morton
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>
---
drivers/char/vc_screen.c | 2 ++
drivers/char/vt.c | 5 +++++
include/linux/selection.h | 1 +
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 9013573..58e8d5e 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -528,6 +528,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 281aada..a8ec48e 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 8cdaa11..85193aa 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* patch "vcs: invoke the vt update callback when /dev/vcs* is written to" added to gregkh-2.6 tree
2010-10-01 4:10 [PATCH 2/2] vcs: invoke the vt update callback when /dev/vcs* is written to Nicolas Pitre
@ 2010-10-05 23:18 ` gregkh
0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2010-10-05 23:18 UTC (permalink / raw)
To: nico, akpm, alan, gregkh, linux-kernel, nicolas.pitre
This is a note to let you know that I've just added the patch titled
vcs: invoke the vt update callback when /dev/vcs* is written to
to my gregkh-2.6 tree which can be found in directory form at:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
and in git form at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/patches.git
The filename of this patch is:
vcs-invoke-the-vt-update-callback-when-dev-vcs-is-written-to.patch
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
If this patch meets the merge guidelines for a bugfix, it should be
merged into Linus's tree before the next major kernel release.
If not, it will be merged into Linus's tree during the next merge window.
Either way, you will probably be copied on the patch when it gets sent
to Linus for merging so that others can see what is happening in kernel
development.
If you have any questions about this process, please let me know.
>From nico@fluxnic.net Tue Oct 5 15:58:16 2010
Date: Fri, 01 Oct 2010 00:10:44 -0400 (EDT)
From: Nicolas Pitre <nico@fluxnic.net>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: vcs: invoke the vt update callback when /dev/vcs* is written to
Message-id: <alpine.LFD.2.00.1009302329370.1146@xanadu.home>
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>
---
drivers/char/vc_screen.c | 2 ++
drivers/char/vt.c | 5 +++++
include/linux/selection.h | 1 +
3 files changed, 8 insertions(+)
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -538,6 +538,8 @@ vcs_write(struct file *file, const char
}
*ppos += written;
ret = written;
+ if (written)
+ vcs_scr_updated(vc);
unlock_out:
release_console_sem();
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -4182,6 +4182,11 @@ void vcs_scr_writew(struct vc_data *vc,
}
}
+void vcs_scr_updated(struct vc_data *vc)
+{
+ notify_update(vc);
+}
+
/*
* Visible symbols for modules
*/
--- a/include/linux/selection.h
+++ b/include/linux/selection.h
@@ -39,5 +39,6 @@ extern void putconsxy(struct vc_data *vc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-05 23:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01 4:10 [PATCH 2/2] vcs: invoke the vt update callback when /dev/vcs* is written to Nicolas Pitre
2010-10-05 23:18 ` patch "vcs: invoke the vt update callback when /dev/vcs* is written to" added to gregkh-2.6 tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox