WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Use memmove instead of memcpy for overlapping areas (con

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Use memmove instead of memcpy for overlapping areas (console scroll).
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Apr 2006 12:08:15 +0000
Delivery-date: Thu, 13 Apr 2006 05:10:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 6692dd873e21d74073a3c61d5905e55ee0ffd8be
# Parent  3c05406f5e0acc37eb3e59311c7d1c3cf245dc29
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@xxxxxxxx>

diff -r 3c05406f5e0a -r 6692dd873e21 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Thu Apr 13 10:24:00 2006
+++ b/xen/drivers/char/console.c        Thu Apr 13 10:25:03 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);
     }
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Use memmove instead of memcpy for overlapping areas (console scroll)., Xen patchbot -unstable <=