# HG changeset patch # User tristan.gingold@xxxxxxxx # Node ID d2be6e89ea51a8469500d9abccf02af4c9d1bc3d # Parent bfc00c83f08318097446b3818c9de6f2ce286fb6 Use memmove instead of memcpy for overlapping areas (console scroll). Use memset instead of memcpy to clear line. Signed-off-by: Tristan Gingold diff -r bfc00c83f083 -r d2be6e89ea51 xen/drivers/char/console.c --- a/xen/drivers/char/console.c Fri Apr 7 20:06:44 2006 +++ b/xen/drivers/char/console.c Thu Apr 13 04:35:47 2006 @@ -180,12 +180,10 @@ if (ypos >= LINES) { - static char zeroarr[2*COLUMNS] = { 0 }; ypos = LINES-1; - memcpy((char*)video, - (char*)video + 2*COLUMNS, (LINES-1)*2*COLUMNS); - memcpy((char*)video + (LINES-1)*2*COLUMNS, - zeroarr, 2*COLUMNS); + memmove((char*)video, + (char*)video + 2*COLUMNS, (LINES-1)*2*COLUMNS); + memset((char*)video + (LINES-1)*2*COLUMNS, 0, 2*COLUMNS); } }