* [PATCH] tty vt: Fix a regression in command line edition
@ 2012-11-20 16:35 Jean-Francois Moine
2012-11-20 17:13 ` Krzysztof Mazur
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Francois Moine @ 2012-11-20 16:35 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, Krzysztof Mazur
From: Jean-François Moine <moinejf@free.fr>
The commit 81732c3b2fede049a692e58a7ceabb6d18ffb18c
("Fix line garbage in virtual console on command line edition")
made a regression with some machines: some characters were not erased
after line edition.
This patch adjusts the number of moved characters and the size of the
region to be updated.
It may be applied on both kernels 3.6 and 3.7.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Tested-by: Krzysztof Mazur <krzysiek@podlesie.net>
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -539,25 +539,25 @@
{
unsigned short *p = (unsigned short *) vc->vc_pos;
- scr_memmovew(p + nr, p, vc->vc_cols - vc->vc_x);
+ scr_memmovew(p + nr, p, (vc->vc_cols - vc->vc_x) * 2);
scr_memsetw(p, vc->vc_video_erase_char, nr * 2);
vc->vc_need_wrap = 0;
if (DO_UPDATE(vc))
do_update_region(vc, (unsigned long) p,
- (vc->vc_cols - vc->vc_x) / 2 + 1);
+ vc->vc_cols - vc->vc_x);
}
static void delete_char(struct vc_data *vc, unsigned int nr)
{
unsigned short *p = (unsigned short *) vc->vc_pos;
- scr_memcpyw(p, p + nr, vc->vc_cols - vc->vc_x - nr);
+ scr_memcpyw(p, p + nr, (vc->vc_cols - vc->vc_x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->vc_x - nr, vc->vc_video_erase_char,
nr * 2);
vc->vc_need_wrap = 0;
if (DO_UPDATE(vc))
do_update_region(vc, (unsigned long) p,
- (vc->vc_cols - vc->vc_x) / 2);
+ vc->vc_cols - vc->vc_x);
}
static int softcursor_original;
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] tty vt: Fix a regression in command line edition
2012-11-20 16:35 [PATCH] tty vt: Fix a regression in command line edition Jean-Francois Moine
@ 2012-11-20 17:13 ` Krzysztof Mazur
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Mazur @ 2012-11-20 17:13 UTC (permalink / raw)
To: Jean-Francois Moine; +Cc: Greg Kroah-Hartman, linux-kernel
On Tue, Nov 20, 2012 at 05:35:41PM +0100, Jean-Francois Moine wrote:
> From: Jean-François Moine <moinejf@free.fr>
>
> The commit 81732c3b2fede049a692e58a7ceabb6d18ffb18c
> ("Fix line garbage in virtual console on command line edition")
> made a regression with some machines: some characters were not erased
> after line edition.
>
> This patch adjusts the number of moved characters and the size of the
> region to be updated.
>
> It may be applied on both kernels 3.6 and 3.7.
>
3.6? Commit 81732c exists only in 3.7. 3.6 is not affected.
Krzysiek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-20 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-20 16:35 [PATCH] tty vt: Fix a regression in command line edition Jean-Francois Moine
2012-11-20 17:13 ` Krzysztof Mazur
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.