aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt/vt.c
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2012-11-20 11:35:41 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-21 19:45:32 -0500
commitb1a925f44a3a21c538144e30b08f966cad7adb63 (patch)
tree6709bbeda624250b3057bba012388b3dc19e3ac0 /drivers/tty/vt/vt.c
parentf4a75d2eb7b1e2206094b901be09adb31ba63681 (diff)
tty vt: Fix a regression in command line edition
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. Signed-off-by: Jean-François Moine <moinejf@free.fr> Tested-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/vt.c')
-rw-r--r--drivers/tty/vt/vt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index f87d7e8964bf..4e0d0c3734b3 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -539,25 +539,25 @@ static void insert_char(struct vc_data *vc, unsigned int nr)
539{ 539{
540 unsigned short *p = (unsigned short *) vc->vc_pos; 540 unsigned short *p = (unsigned short *) vc->vc_pos;
541 541
542 scr_memmovew(p + nr, p, vc->vc_cols - vc->vc_x); 542 scr_memmovew(p + nr, p, (vc->vc_cols - vc->vc_x) * 2);
543 scr_memsetw(p, vc->vc_video_erase_char, nr * 2); 543 scr_memsetw(p, vc->vc_video_erase_char, nr * 2);
544 vc->vc_need_wrap = 0; 544 vc->vc_need_wrap = 0;
545 if (DO_UPDATE(vc)) 545 if (DO_UPDATE(vc))
546 do_update_region(vc, (unsigned long) p, 546 do_update_region(vc, (unsigned long) p,
547 (vc->vc_cols - vc->vc_x) / 2 + 1); 547 vc->vc_cols - vc->vc_x);
548} 548}
549 549
550static void delete_char(struct vc_data *vc, unsigned int nr) 550static void delete_char(struct vc_data *vc, unsigned int nr)
551{ 551{
552 unsigned short *p = (unsigned short *) vc->vc_pos; 552 unsigned short *p = (unsigned short *) vc->vc_pos;
553 553
554 scr_memcpyw(p, p + nr, vc->vc_cols - vc->vc_x - nr); 554 scr_memcpyw(p, p + nr, (vc->vc_cols - vc->vc_x - nr) * 2);
555 scr_memsetw(p + vc->vc_cols - vc->vc_x - nr, vc->vc_video_erase_char, 555 scr_memsetw(p + vc->vc_cols - vc->vc_x - nr, vc->vc_video_erase_char,
556 nr * 2); 556 nr * 2);
557 vc->vc_need_wrap = 0; 557 vc->vc_need_wrap = 0;
558 if (DO_UPDATE(vc)) 558 if (DO_UPDATE(vc))
559 do_update_region(vc, (unsigned long) p, 559 do_update_region(vc, (unsigned long) p,
560 (vc->vc_cols - vc->vc_x) / 2); 560 vc->vc_cols - vc->vc_x);
561} 561}
562 562
563static int softcursor_original; 563static int softcursor_original;