From ee636500d6eab44b83f09cb730b67226b70423b1 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 20 Jan 2010 00:56:24 +0100 Subject: mmap_frag() users only check for -1 error Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- linux-user/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user/mmap.c') diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c1c7e4858e..25fc0b2959 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -243,7 +243,7 @@ static int mmap_frag(abi_ulong real_start, possible while it is a shared mapping */ if ((flags & MAP_TYPE) == MAP_SHARED && (prot & PROT_WRITE)) - return -EINVAL; + return -1; /* adjust protection to be able to read */ if (!(prot1 & PROT_WRITE)) -- cgit v1.2.1