|
@@ -77,11 +77,11 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
|
|
|
#endif
|
|
|
|
|
|
if ((start & ~TARGET_PAGE_MASK) != 0)
|
|
|
- return -EINVAL;
|
|
|
+ return -TARGET_EINVAL;
|
|
|
len = TARGET_PAGE_ALIGN(len);
|
|
|
end = start + len;
|
|
|
if (!guest_range_valid(start, len)) {
|
|
|
- return -ENOMEM;
|
|
|
+ return -TARGET_ENOMEM;
|
|
|
}
|
|
|
prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
|
|
|
if (len == 0)
|
|
@@ -621,10 +621,10 @@ int target_munmap(abi_ulong start, abi_ulong len)
|
|
|
start, len);
|
|
|
#endif
|
|
|
if (start & ~TARGET_PAGE_MASK)
|
|
|
- return -EINVAL;
|
|
|
+ return -TARGET_EINVAL;
|
|
|
len = TARGET_PAGE_ALIGN(len);
|
|
|
if (len == 0 || !guest_range_valid(start, len)) {
|
|
|
- return -EINVAL;
|
|
|
+ return -TARGET_EINVAL;
|
|
|
}
|
|
|
|
|
|
mmap_lock();
|