diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-13 21:08:07 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-13 21:08:07 +0000 |
commit | 2054ac9baf27ecec52acde96881c9f0278ce04da (patch) | |
tree | c76df382d9c6d6a0b37b7430877518a242efb127 /linux-user/syscall.c | |
parent | 34c9dd8eea38e94d97e22ac12c2f2aaa0dca59d8 (diff) | |
download | qemu-2054ac9baf27ecec52acde96881c9f0278ce04da.zip |
linux-user: Add readahead syscall
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5479 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f1f050ee62..dc7e561009 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5761,7 +5761,20 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #ifdef TARGET_NR_readahead case TARGET_NR_readahead: - goto unimplemented; +#if TARGET_ABI_BITS == 32 +#ifdef TARGET_ARM + if (((CPUARMState *)cpu_env)->eabi) + { + arg2 = arg3; + arg3 = arg4; + arg4 = arg5; + } +#endif + ret = get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, arg4)); +#else + ret = get_errno(readahead(arg1, arg2, arg3)); +#endif + break; #endif #ifdef TARGET_NR_setxattr case TARGET_NR_setxattr: |