Add fadvise64 stubs
PATCH 1/1 Add fadvise64 stubs
Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS.
--- linux-user/syscall.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
linux-user/syscall.c +12 -0
@@ -5576,6 +5576,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,case TARGET_NR_mincore: goto unimplemented;#endif +#ifdef TARGET_NR_fadvise64_64 +case TARGET_NR_fadvise64_64: +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 ); +break ; +#endif +#ifdef TARGET_NR_arm_fadvise64_64 +case TARGET_NR_arm_fadvise64_64: +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 ); +break ; +#endif #ifdef TARGET_NR_madvisecase TARGET_NR_madvise:/* A straight passthrough may not be safe because qemu sometimes
Signature · 5 lines
1.5.6.5 -- "rm -rf" only sounds scary if you don't have backups
PATCH 1/1 Add fadvise64 stubs
Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS.
--- linux-user/syscall.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
linux-user/syscall.c +19 -0
@@ -5509,6 +5509,25 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,case TARGET_NR_mincore: goto unimplemented;#endif +#ifdef TARGET_NR_arm_fadvise64_64 +case TARGET_NR_arm_fadvise64_64: + { +/* +* arm_fadvise64_64 looks like fadvise64_64 but +* with different argument order +*/ +abi_long temp; + temp = arg3; + arg3 = arg4; + arg4 = temp; + } +#endif +#ifdef TARGET_NR_fadvise64_64 +case TARGET_NR_fadvise64_64: +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 ); +break ; +#endif #ifdef TARGET_NR_madvisecase TARGET_NR_madvise:/* A straight passthrough may not be safe because qemu sometimes
Signature · 1 line
1.5.6.5.GIT
Quoted 29 lines · Kirill A. Shutemov
Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS.
Signed-off-by Riku Voipio <[email protected]>Signed-off-by Kirill A. Shutemov <[email protected]>--- linux-user/syscall.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)linux-user/syscall.c +12
-0@@ -5509,6 +5509,25 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,case TARGET_NR_mincore: goto unimplemented;#endif +#ifdef TARGET_NR_arm_fadvise64_64 +case TARGET_NR_arm_fadvise64_64: + { +/* +* arm_fadvise64_64 looks like fadvise64_64 but +* with different argument order +*/ +abi_long temp; + temp = arg3; + arg3 = arg4; + arg4 = temp; + }
linux-user/syscall.c abi_long do_syscall(void *cpu_env, int num, abi_long arg1, · line 5533
Quoted 10 lines
linux-user/syscall.c +7
-0+#endif +#ifdef TARGET_NR_fadvise64_64 +case TARGET_NR_fadvise64_64: +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 ); +break ; +#endif #ifdef TARGET_NR_madvisecase TARGET_NR_madvise:/* A straight passthrough may not be safe because qemu sometimes
Mmmh, what happens if TARGET_NR_arm_fadvise64_64 is set but TARGET_NR_fadvise64_64 isn't :)
Signature · 1 line
"rm -rf" only sounds scary if you don't have backups
Quoted 35 lines · Riku Voipio
Quoted 34 lines · Kirill A. Shutemov
Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS.
Signed-off-by Riku Voipio <[email protected]>Signed-off-by Kirill A. Shutemov <[email protected]>--- linux-user/syscall.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)linux-user/syscall.c +17
-0@@ -5509,6 +5509,25 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,case TARGET_NR_mincore: goto unimplemented;#endif +#ifdef TARGET_NR_arm_fadvise64_64 +case TARGET_NR_arm_fadvise64_64: + { +/* +* arm_fadvise64_64 looks like fadvise64_64 but +* with different argument order +*/ +abi_long temp; + temp = arg3; + arg3 = arg4; + arg4 = temp; + } +#endif +#ifdef TARGET_NR_fadvise64_64 +case TARGET_NR_fadvise64_64: +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 );
Quoted 8 lines
linux-user/syscall.c abi_long do_syscall(void *cpu_env, int num, abi_long arg1, · line 5533
Quoted 5 lines
linux-user/syscall.c +2
-0+break ; +#endif #ifdef TARGET_NR_madvisecase TARGET_NR_madvise:/* A straight passthrough may not be safe because qemu sometimes Mmmh, what happens if
TARGET_NR_arm_fadvise64_64is set butTARGET_NR_fadvise64_64isn't :)
Oops... I'll fix it.
Signature · 3 lines
Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/
PATCH 1/1 Add fadvise64 stubs
In reply to Riku VoipioSince these are only hints, we happily fake them for now to make applications not barf on ENOSYS.
--- linux-user/syscall.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)
linux-user/syscall.c +21 -0
@@ -5572,6 +5572,27 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,case TARGET_NR_mincore: goto unimplemented;#endif +#ifdef TARGET_NR_arm_fadvise64_64 +case TARGET_NR_arm_fadvise64_64: + { +/* +* arm_fadvise64_64 looks like fadvise64_64 but +* with different argument order +*/ +abi_long temp; + temp = arg3; + arg3 = arg4; + arg4 = temp; + } +#endif +#if defined(TARGET_NR_fadvise64_64) || defined(TARGET_NR_arm_fadvise64_64) +#ifdef TARGET_NR_fadvise64_64 +case TARGET_NR_fadvise64_64: +#endif +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 ); +break ; +#endif #ifdef TARGET_NR_madvisecase TARGET_NR_madvise:/* A straight passthrough may not be safe because qemu sometimes
Signature · 1 line
1.5.6.5.GIT
Quoted 5 lines · Kirill A. Shutemov
Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS.
Signed-off-by Riku Voipio <[email protected]>Signed-off-by Kirill A. Shutemov <[email protected]>
Ack.
Quoted 38 lines
--- linux-user/syscall.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)linux-user/syscall.c +21
-0@@ -5572,6 +5572,27 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,case TARGET_NR_mincore: goto unimplemented;#endif +#ifdef TARGET_NR_arm_fadvise64_64 +case TARGET_NR_arm_fadvise64_64: + { +/* +* arm_fadvise64_64 looks like fadvise64_64 but +* with different argument order +*/ +abi_long temp; + temp = arg3; + arg3 = arg4; + arg4 = temp; + } +#endif +#if defined(TARGET_NR_fadvise64_64) || defined(TARGET_NR_arm_fadvise64_64) +#ifdef TARGET_NR_fadvise64_64 +case TARGET_NR_fadvise64_64: +#endif +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 ); +break ; +#endif #ifdef TARGET_NR_madvisecase TARGET_NR_madvise:/* A straight passthrough may not be safe because qemu sometimes Signature · 1 line
1.5.6.5.GIT
Signature · 1 line
"rm -rf" only sounds scary if you don't have backups
Aurelien Jarno
AppliedQuoted 2 lines · Kirill A. Shutemov
Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS.
Applied, thanks.
Quoted 44 lines
Signed-off-by Riku Voipio <[email protected]>Signed-off-by Kirill A. Shutemov <[email protected]>--- linux-user/syscall.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)linux-user/syscall.c +21
-0@@ -5572,6 +5572,27 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,case TARGET_NR_mincore: goto unimplemented;#endif +#ifdef TARGET_NR_arm_fadvise64_64 +case TARGET_NR_arm_fadvise64_64: + { +/* +* arm_fadvise64_64 looks like fadvise64_64 but +* with different argument order +*/ +abi_long temp; + temp = arg3; + arg3 = arg4; + arg4 = temp; + } +#endif +#if defined(TARGET_NR_fadvise64_64) || defined(TARGET_NR_arm_fadvise64_64) +#ifdef TARGET_NR_fadvise64_64 +case TARGET_NR_fadvise64_64: +#endif +/* This is a hint, so ignoring and returning success is ok. */ + ret =get_errno (0 ); +break ; +#endif #ifdef TARGET_NR_madvisecase TARGET_NR_madvise:/* A straight passthrough may not be safe because qemu sometimes Signature · 1 line
1.5.6.5.GIT
Signature · 4 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net