bsd/darwin-user: mmap_frag() users only check for -1 error
See also ee636500d6
.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
416c60602f
commit
059bca46bb
@ -240,7 +240,7 @@ static int mmap_frag(abi_ulong real_start,
|
|||||||
possible while it is a shared mapping */
|
possible while it is a shared mapping */
|
||||||
if ((flags & TARGET_BSD_MAP_FLAGMASK) == MAP_SHARED &&
|
if ((flags & TARGET_BSD_MAP_FLAGMASK) == MAP_SHARED &&
|
||||||
(prot & PROT_WRITE))
|
(prot & PROT_WRITE))
|
||||||
return -EINVAL;
|
return -1;
|
||||||
|
|
||||||
/* adjust protection to be able to read */
|
/* adjust protection to be able to read */
|
||||||
if (!(prot1 & PROT_WRITE))
|
if (!(prot1 & PROT_WRITE))
|
||||||
|
@ -129,7 +129,7 @@ int mmap_frag(unsigned long host_start,
|
|||||||
if ((flags & MAP_SHARED) &&
|
if ((flags & MAP_SHARED) &&
|
||||||
#endif
|
#endif
|
||||||
(prot & PROT_WRITE))
|
(prot & PROT_WRITE))
|
||||||
return -EINVAL;
|
return -1;
|
||||||
|
|
||||||
/* adjust protection to be able to read */
|
/* adjust protection to be able to read */
|
||||||
if (!(prot1 & PROT_WRITE))
|
if (!(prot1 & PROT_WRITE))
|
||||||
|
Loading…
Reference in New Issue
Block a user