Commit 408321b61f290b91aca74dce6ab71b8fea2a5469
1 parent
f0f72ffe
Add fadvise64 stubs
Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> 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@5386 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
21 additions
and
0 deletions
linux-user/syscall.c
... | ... | @@ -5578,6 +5578,27 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, |
5578 | 5578 | case TARGET_NR_mincore: |
5579 | 5579 | goto unimplemented; |
5580 | 5580 | #endif |
5581 | +#ifdef TARGET_NR_arm_fadvise64_64 | |
5582 | + case TARGET_NR_arm_fadvise64_64: | |
5583 | + { | |
5584 | + /* | |
5585 | + * arm_fadvise64_64 looks like fadvise64_64 but | |
5586 | + * with different argument order | |
5587 | + */ | |
5588 | + abi_long temp; | |
5589 | + temp = arg3; | |
5590 | + arg3 = arg4; | |
5591 | + arg4 = temp; | |
5592 | + } | |
5593 | +#endif | |
5594 | +#if defined(TARGET_NR_fadvise64_64) || defined(TARGET_NR_arm_fadvise64_64) | |
5595 | +#ifdef TARGET_NR_fadvise64_64 | |
5596 | + case TARGET_NR_fadvise64_64: | |
5597 | +#endif | |
5598 | + /* This is a hint, so ignoring and returning success is ok. */ | |
5599 | + ret = get_errno(0); | |
5600 | + break; | |
5601 | +#endif | |
5581 | 5602 | #ifdef TARGET_NR_madvise |
5582 | 5603 | case TARGET_NR_madvise: |
5583 | 5604 | /* A straight passthrough may not be safe because qemu sometimes | ... | ... |