diff mbox

[PULL,27/44] linux-user: Fix error conversion in 64-bit fadvise syscall

Message ID 977d8241c10de4160a9377efd496395c98b7dee9.1465392531.git.riku.voipio@linaro.org
State Accepted
Commit 977d8241c10de4160a9377efd496395c98b7dee9
Headers show

Commit Message

Riku Voipio June 8, 2016, 1:30 p.m. UTC
From: Peter Maydell <peter.maydell@linaro.org>


Fix a missing host-to-target errno conversion in the 64-bit
fadvise syscall emulation.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>

---
 linux-user/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.1.4
diff mbox

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5cff9f7..8f8d9db 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -10035,8 +10035,8 @@  abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         default: break;
         }
 #endif
-        ret = -posix_fadvise(arg1, arg2, arg3, arg4);
-	break;
+        ret = -host_to_target_errno(posix_fadvise(arg1, arg2, arg3, arg4));
+        break;
 #endif
 #endif /* end of 64-bit ABI fadvise handling */