diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-22 10:15:10 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-22 10:15:10 +0000 |
commit | 6db45e6519fee264ef3bbe88f50233f23640b403 (patch) | |
tree | b00bda307f8acb61f4abdc388830cbadac91ca79 /linux-user/syscall_defs.h | |
parent | 072ae847f9ac50392f618b7bcf01184b31f49a8f (diff) |
Use correct data structures for stat syscalls, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3001 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall_defs.h')
-rw-r--r-- | linux-user/syscall_defs.h | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 5ae95b2914..0e39a2e77e 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -869,7 +869,7 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */ #endif -#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4) +#if defined(TARGET_I386) || defined(TARGET_ARM) struct target_stat { unsigned short st_dev; unsigned short __pad1; @@ -1242,6 +1242,65 @@ struct target_stat64 { target_long __unused[3]; }; +#elif defined(TARGET_SH4) + +struct target_stat { + target_ulong st_dev; + target_ulong st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + target_ulong st_rdev; + target_ulong st_size; + target_ulong st_blksize; + target_ulong st_blocks; + target_ulong target_st_atime; + target_ulong target_st_atime_nsec; + target_ulong target_st_mtime; + target_ulong target_st_mtime_nsec; + target_ulong target_st_ctime; + target_ulong target_st_ctime_nsec; + target_ulong __unused4; + target_ulong __unused5; +}; + +/* This matches struct stat64 in glibc2.1, hence the absolutely + * insane amounts of padding around dev_t's. + */ +struct target_stat64 { + unsigned long long st_dev; + unsigned char __pad0[4]; + +#define TARGET_STAT64_HAS_BROKEN_ST_INO 1 + target_ulong __st_ino; + + unsigned int st_mode; + unsigned int st_nlink; + + target_ulong st_uid; + target_ulong st_gid; + + unsigned long long st_rdev; + unsigned char __pad3[4]; + + long long st_size; + target_ulong st_blksize; + + unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ + + target_ulong target_st_atime; + target_ulong target_st_atime_nsec; + + target_ulong target_st_mtime; + target_ulong target_st_mtime_nsec; + + target_ulong target_st_ctime; + target_ulong target_st_ctime_nsec; + + unsigned long long st_ino; +}; + #else #error unsupported CPU #endif |