Add readahead syscall
PATCH 1/1 Add readahead syscall
--- linux-user/syscall.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
linux-user/syscall.c +2 -1
@@ -5738,7 +5738,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,break ;#ifdef TARGET_NR_readaheadcase TARGET_NR_readahead: - goto unimplemented; + ret =get_errno (readahead (arg1, arg2, arg3)); +break ;#endif #ifdef TARGET_NR_setxattrcase TARGET_NR_setxattr:
Signature · 5 lines
1.5.6.5 -- "rm -rf" only sounds scary if you don't have backups
Quoted 11 lines · Riku Voipio
Signed-off-by Riku Voipio <[email protected]>--- linux-user/syscall.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)linux-user/syscall.c +0
-0
linux-user/syscall.c abi_long do_syscall(void *cpu_env, int num, abi_long arg1, · line 5745
Quoted 9 lines
linux-user/syscall.c +2
-1@@ -5738,7 +5738,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,break ;#ifdef TARGET_NR_readaheadcase TARGET_NR_readahead: - goto unimplemented; + ret =get_errno (readahead (arg1, arg2, arg3)); +break ;#endif #ifdef TARGET_NR_setxattrcase TARGET_NR_setxattr:
Looks good for me. Added to my patchset.
Quoted 8 lines
Signature · 5 lines
1.5.6.5 -- "rm -rf" only sounds scary if you don't have backups
Signature · 3 lines
Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/
linux-user/syscall.c abi_long do_syscall(void *cpu_env, int num, abi_long arg1, · line 5742
Quoted 5 lines
#ifdef
TARGET_NR_readahead
caseTARGET_NR_readahead:linux-user/syscall.c +2
-1- goto unimplemented; + ret =get_errno (readahead (arg1, arg2, arg3)); +break ;
This is wrong on 32-bit targets, and especially wrong on ARM where there are two variants.
Paul
Quoted 8 lines · Paul Brook
linux-user/syscall.c abi_long do_syscall(void *cpu_env, int num, abi_long arg1, · line 5742
Quoted 5 lines
#ifdef
TARGET_NR_readahead
caseTARGET_NR_readahead:linux-user/syscall.c +2
-1- goto unimplemented; + ret =get_errno (readahead (arg1, arg2, arg3)); +break ;This is wrong on 32-bit targets, and especially wrong on ARM where there are two variants.
Two variants?
$ git grep readahead arch/arm/include/asm/unistd.h arch/arm/include/asm/unistd.h:#define __NR_readahead (__NR_SYSCALL_BASE+225)
Signature · 3 lines
Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/
Quoted 11 lines · Kirill A. Shutemov
Quoted 8 lines · Paul Brook
linux-user/syscall.c abi_long do_syscall(void *cpu_env, int num, abi_long arg1, · line 5742
Quoted 5 lines
#ifdef
TARGET_NR_readahead
caseTARGET_NR_readahead:linux-user/syscall.c +2
-1- goto unimplemented; + ret =get_errno (readahead (arg1, arg2, arg3)); +break ;This is wrong on 32-bit targets, and especially wrong on ARM where there are two variants.
Two variants?
EABI and old-abi.
Paul