[CRIU] [crtools-bot for Cyrill Gorcunov ] restore: Use %lx for map_files

Cyrill Gorcunov gorcunov at openvz.org
Mon Feb 20 05:23:27 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 85235af88964ac77742ff237df4722dca634f26b
Author: Cyrill Gorcunov <gorcunov at openvz.org>
Date:   Fri Feb 17 11:07:03 2012 +0400

    restore: Use %lx for map_files
    
    map_files format defined as %lx-%lx in
    kernel and while there should not be a
    problem if it's written in %p-%p, still
    better to be on a safe side and follow
    kernel's notation.
    
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
---
 cr-restore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cr-restore.c b/cr-restore.c
index fb71300..38d8b4f 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -346,8 +346,8 @@ static int shmem_remap(void *old_addr, void *new_addr, unsigned long size)
 	int fd;
 	void *ret;
 
-	sprintf(path, "/proc/self/map_files/%p-%p",
-		old_addr, (void *)old_addr + size);
+	sprintf(path, "/proc/self/map_files/%lx-%lx",
+		(long)old_addr, (long)old_addr + size);
 
 	fd = open(path, O_RDWR);
 	if (fd < 0) {


More information about the CRIU mailing list