]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user: Fix error conversion in 64-bit fadvise syscall
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 31 May 2016 14:45:11 +0000 (15:45 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Wed, 8 Jun 2016 07:13:45 +0000 (10:13 +0300)
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

index 5cff9f78795c4ca339271fef0ebca474cdeecef7..8f8d9db78c31e1117527ccd8631043e32e9da8c5 100644 (file)
@@ -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 */