linux-user: Fix readahead

Calculation of 64-bit offset was not correct for all cases.

Signed-off-by: Lena Djokic <Lena.Djokic@rt-rk.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
Lena Djokic 2016-11-24 17:08:56 +01:00 committed by Laurent Vivier
parent fea243e90a
commit 77c6850fd7
1 changed files with 1 additions and 1 deletions

View File

@ -11228,7 +11228,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
arg3 = arg4;
arg4 = arg5;
}
ret = get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, arg4));
ret = get_errno(readahead(arg1, target_offset64(arg2, arg3) , arg4));
#else
ret = get_errno(readahead(arg1, arg2, arg3));
#endif