[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/15] linux-user: fix fadvise64_64() on ppc
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 03/15] linux-user: fix fadvise64_64() on ppc |
Date: |
Wed, 31 May 2017 16:08:15 +0300 |
From: Laurent Vivier <address@hidden>
On ppc, advice is arg2, not arg6:
long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
u32 len_high, u32 len_low)
Signed-off-by: Laurent Vivier <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2da8426aaa..671b13a23b 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -11261,6 +11261,15 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
#ifdef TARGET_NR_fadvise64_64
case TARGET_NR_fadvise64_64:
+#if defined(TARGET_PPC)
+ /* 6 args: fd, advice, offset (high, low), len (high, low) */
+ ret = arg2;
+ arg2 = arg3;
+ arg3 = arg4;
+ arg4 = arg5;
+ arg5 = arg6;
+ arg6 = ret;
+#else
/* 6 args: fd, offset (high, low), len (high, low), advice */
if (regpairs_aligned(cpu_env)) {
/* offset is in (3,4), len in (5,6) and advice in 7 */
@@ -11270,6 +11279,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
arg5 = arg6;
arg6 = arg7;
}
+#endif
ret = -host_to_target_errno(posix_fadvise(arg1,
target_offset64(arg2, arg3),
target_offset64(arg4, arg5),
--
2.11.0
- [Qemu-devel] [PULL 00/15] Misc linux-user updates, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 02/15] linux-user: fix eventfd, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 01/15] linux-user: call fd_trans_target_to_host_data() for write(), riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 03/15] linux-user: fix fadvise64_64() on ppc,
riku . voipio <=
- [Qemu-devel] [PULL 04/15] linux-user: fix inotify, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 05/15] linux-user: allocate heap memory for execve arguments, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 08/15] linux-user: add tkill(), tgkill() and rt_sigqueueinfo() strace, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 09/15] linux-user: fix ssetmask() system call, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 06/15] linux-user: remove all traces of qemu from /proc/self/cmdline, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 07/15] linux-user: add strace for getuid(), gettid(), getppid(), geteuid(), riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 10/15] linux-user: fix mismatch of lock/unlock_user() invocations in rt_sigqueinfo() syscall, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 12/15] linux-user: add support for rt_tgsigqueueinfo() system call, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 13/15] linux-user: add rt_tgsigqueueinfo() strace, riku . voipio, 2017/05/31
- [Qemu-devel] [PULL 14/15] linux-user: fix inconsistent spaces in print_siginfo() output, riku . voipio, 2017/05/31