Commit 7d600c804d79e21254a20b953d6bd175597d752d

Authored by ths
1 parent 71fb7241

Fix fstat for MIPS userland emulation, and add support for a cacheflush

syscall, thanks to Dave Denholm.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2234 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 1 deletions
linux-user/syscall.c
... ... @@ -2933,7 +2933,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
2933 2933 lock_user_struct(target_st, arg2, 0);
2934 2934 target_st->st_dev = tswap16(st.st_dev);
2935 2935 target_st->st_ino = tswapl(st.st_ino);
2936   -#if defined(TARGET_PPC)
  2936 +#if defined(TARGET_PPC) || defined(TARGET_MIPS)
2937 2937 target_st->st_mode = tswapl(st.st_mode); /* XXX: check this */
2938 2938 target_st->st_uid = tswap32(st.st_uid);
2939 2939 target_st->st_gid = tswap32(st.st_gid);
... ... @@ -3829,6 +3829,12 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
3829 3829 break;
3830 3830 }
3831 3831 #endif
  3832 +#ifdef TARGET_NR_cacheflush
  3833 + case TARGET_NR_cacheflush:
  3834 + /* self-modifying code is handled automatically, so nothing needed */
  3835 + ret = 0;
  3836 + break;
  3837 +#endif
3832 3838 #ifdef TARGET_NR_security
3833 3839 case TARGET_NR_security:
3834 3840 goto unimplemented;
... ...