Commit c12ab05ca5b8d214c880872f23cc4bc155183c25

Authored by ths
1 parent e3584658

Patch for pipe() result handling, by Stuart Anderson.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2907 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 0 deletions
linux-user/syscall.c
... ... @@ -2338,8 +2338,13 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
2338 2338 int host_pipe[2];
2339 2339 ret = get_errno(pipe(host_pipe));
2340 2340 if (!is_error(ret)) {
  2341 +#if defined(TARGET_MIPS)
  2342 + ((CPUMIPSState*)cpu_env)->gpr[3] = host_pipe[1];
  2343 + ret = host_pipe[0];
  2344 +#else
2341 2345 tput32(arg1, host_pipe[0]);
2342 2346 tput32(arg1 + 4, host_pipe[1]);
  2347 +#endif
2343 2348 }
2344 2349 }
2345 2350 break;
... ...