diff mbox

[3/3] linux-user: Fix error conversion in 64-bit fadvise syscall

Message ID 1464705911-28960-4-git-send-email-peter.maydell@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Maydell May 31, 2016, 2:45 p.m. UTC
Fix a missing host-to-target errno conversion in the 64-bit
fadvise syscall emulation.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Laurent Vivier June 2, 2016, 1:30 p.m. UTC | #1
Le 31/05/2016 à 16:45, Peter Maydell a écrit :
> Fix a missing host-to-target errno conversion in the 64-bit
> fadvise syscall emulation.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  linux-user/syscall.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 638b455..31a9484 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -9394,8 +9394,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 */
>  
> 
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff mbox

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 638b455..31a9484 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9394,8 +9394,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 */