From 005b35a13b856c59d64af792dab415b0b9dbd49f Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 29 Jul 2011 15:16:45 +0800 Subject: sandbox: switch to resource Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/sandbox/os/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/sandbox/os') diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c index dcaf0c837e..5074a06c80 100644 --- a/arch/sandbox/os/common.c +++ b/arch/sandbox/os/common.c @@ -236,10 +236,10 @@ static int add_image(char *str, char *name) hf->name = strdup(name); if (map) { - hf->map_base = (unsigned long)mmap(NULL, hf->size, + hf->base = (unsigned long)mmap(NULL, hf->size, PROT_READ | (readonly ? 0 : PROT_WRITE), MAP_SHARED, fd, 0); - if ((void *)hf->map_base == MAP_FAILED) + if ((void *)hf->base == MAP_FAILED) printf("warning: mmapping %s failed\n", file); } -- cgit v1.2.3