diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-07-08 10:08:24 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-07-08 10:08:24 +0000 |
commit | 1b8dd648bdccefa8ba1b05416e65e9b3a278b0e6 (patch) | |
tree | 9fd48ef072e8d14a10cd1e3cd59081dffbe80e35 /linux-user/syscall.c | |
parent | 17d996e1f1de8057b3bb88b753e65735a6d8f191 (diff) |
Fix Sparc64 stat system call
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3053 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 6cad6d92f4..52806bb20e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3535,7 +3535,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, struct target_stat *target_st; lock_user_struct(target_st, arg2, 0); -#if defined(TARGET_MIPS) +#if defined(TARGET_MIPS) || defined(TARGET_SPARC64) target_st->st_dev = tswap32(st.st_dev); #else target_st->st_dev = tswap16(st.st_dev); @@ -3545,6 +3545,10 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, target_st->st_mode = tswapl(st.st_mode); /* XXX: check this */ target_st->st_uid = tswap32(st.st_uid); target_st->st_gid = tswap32(st.st_gid); +#elif defined(TARGET_SPARC64) + target_st->st_mode = tswap32(st.st_mode); + target_st->st_uid = tswap32(st.st_uid); + target_st->st_gid = tswap32(st.st_gid); #else target_st->st_mode = tswap16(st.st_mode); target_st->st_uid = tswap16(st.st_uid); @@ -3554,6 +3558,9 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, /* If this is the same on PPC, then just merge w/ the above ifdef */ target_st->st_nlink = tswapl(st.st_nlink); target_st->st_rdev = tswapl(st.st_rdev); +#elif defined(TARGET_SPARC64) + target_st->st_nlink = tswap32(st.st_nlink); + target_st->st_rdev = tswap32(st.st_rdev); #else target_st->st_nlink = tswap16(st.st_nlink); target_st->st_rdev = tswap16(st.st_rdev); |