From patchwork Wed Jan 20 20:14:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [17/17] mmap_frag() users only check for -1 error From: Juan Quintela X-Patchwork-Id: 43359 Message-Id: <783b5271b3a305f0fd9e4bf346f3c7f430311003.1264017981.git.quintela@redhat.com> To: qemu-devel@nongnu.org Date: Wed, 20 Jan 2010 21:14:13 +0100 Signed-off-by: Juan Quintela --- linux-user/mmap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c1c7e48..25fc0b2 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))