ia64/xen-unstable

changeset 9707:6692dd873e21

Use memmove instead of memcpy for overlapping areas (console scroll).
Use memset instead of memcpy to clear line.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 13 11:25:03 2006 +0100 (2006-04-13)
parents 3c05406f5e0a
children 2a7a46dd3bd6
files xen/drivers/char/console.c
line diff
     1.1 --- a/xen/drivers/char/console.c	Thu Apr 13 11:24:00 2006 +0100
     1.2 +++ b/xen/drivers/char/console.c	Thu Apr 13 11:25:03 2006 +0100
     1.3 @@ -180,12 +180,10 @@ static void put_newline(void)
     1.4  
     1.5      if (ypos >= LINES)
     1.6      {
     1.7 -        static char zeroarr[2*COLUMNS] = { 0 };
     1.8          ypos = LINES-1;
     1.9 -        memcpy((char*)video, 
    1.10 -               (char*)video + 2*COLUMNS, (LINES-1)*2*COLUMNS);
    1.11 -        memcpy((char*)video + (LINES-1)*2*COLUMNS, 
    1.12 -               zeroarr, 2*COLUMNS);
    1.13 +        memmove((char*)video, 
    1.14 +                (char*)video + 2*COLUMNS, (LINES-1)*2*COLUMNS);
    1.15 +        memset((char*)video + (LINES-1)*2*COLUMNS, 0, 2*COLUMNS);
    1.16      }
    1.17  }
    1.18