aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-01 11:50:36 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-01 11:50:36 +0000
commitc12ab05ca5b8d214c880872f23cc4bc155183c25 (patch)
tree455a783b3fdc7957287e9f08ecf68c322659fa8e /linux-user/syscall.c
parente35846583b6aaa4ac7f6ac90139d0952f2dee2d8 (diff)
Patch for pipe() result handling, by Stuart Anderson.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2907 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index c80f329c21..64cd5da21e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2338,8 +2338,13 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
int host_pipe[2];
ret = get_errno(pipe(host_pipe));
if (!is_error(ret)) {
+#if defined(TARGET_MIPS)
+ ((CPUMIPSState*)cpu_env)->gpr[3] = host_pipe[1];
+ ret = host_pipe[0];
+#else
tput32(arg1, host_pipe[0]);
tput32(arg1 + 4, host_pipe[1]);
+#endif
}
}
break;