[CRIU] [PATCH 1/8] restore: Use %lx for map_files
Cyrill Gorcunov
gorcunov at openvz.org
Mon Feb 20 04:56:21 EST 2012
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>
---
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) {
--
1.7.7.6
More information about the CRIU
mailing list