1 #ifndef __ASM_SH_STAT_H 2 #define __ASM_SH_STAT_H 3 4 struct __old_kernel_stat { 5 unsigned short st_dev; 6 unsigned short st_ino; 7 unsigned short st_mode; 8 unsigned short st_nlink; 9 unsigned short st_uid; 10 unsigned short st_gid; 11 unsigned short st_rdev; 12 unsigned long st_size; 13 unsigned long st_atime; 14 unsigned long st_mtime; 15 unsigned long st_ctime; 16 }; 17 18 #if defined(__SH5__) || defined(CONFIG_CPU_SH5) 19 struct stat { 20 unsigned short st_dev; 21 unsigned short __pad1; 22 unsigned long st_ino; 23 unsigned short st_mode; 24 unsigned short st_nlink; 25 unsigned short st_uid; 26 unsigned short st_gid; 27 unsigned short st_rdev; 28 unsigned short __pad2; 29 unsigned long st_size; 30 unsigned long st_blksize; 31 unsigned long st_blocks; 32 unsigned long st_atime; 33 unsigned long st_atime_nsec; 34 unsigned long st_mtime; 35 unsigned long st_mtime_nsec; 36 unsigned long st_ctime; 37 unsigned long st_ctime_nsec; 38 unsigned long __unused4; 39 unsigned long __unused5; 40 }; 41 42 /* This matches struct stat64 in glibc2.1, hence the absolutely 43 * insane amounts of padding around dev_t's. 44 */ 45 struct stat64 { 46 unsigned short st_dev; 47 unsigned char __pad0[10]; 48 49 unsigned long st_ino; 50 unsigned int st_mode; 51 unsigned int st_nlink; 52 53 unsigned long st_uid; 54 unsigned long st_gid; 55 56 unsigned short st_rdev; 57 unsigned char __pad3[10]; 58 59 long long st_size; 60 unsigned long st_blksize; 61 62 unsigned long st_blocks; /* Number 512-byte blocks allocated. */ 63 unsigned long __pad4; /* future possible st_blocks high bits */ 64 65 unsigned long st_atime; 66 unsigned long st_atime_nsec; 67 68 unsigned long st_mtime; 69 unsigned long st_mtime_nsec; 70 71 unsigned long st_ctime; 72 unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */ 73 74 unsigned long __unused1; 75 unsigned long __unused2; 76 }; 77 #else 78 struct stat { 79 unsigned long st_dev; 80 unsigned long st_ino; 81 unsigned short st_mode; 82 unsigned short st_nlink; 83 unsigned short st_uid; 84 unsigned short st_gid; 85 unsigned long st_rdev; 86 unsigned long st_size; 87 unsigned long st_blksize; 88 unsigned long st_blocks; 89 unsigned long st_atime; 90 unsigned long st_atime_nsec; 91 unsigned long st_mtime; 92 unsigned long st_mtime_nsec; 93 unsigned long st_ctime; 94 unsigned long st_ctime_nsec; 95 unsigned long __unused4; 96 unsigned long __unused5; 97 }; 98 99 /* This matches struct stat64 in glibc2.1, hence the absolutely 100 * insane amounts of padding around dev_t's. 101 */ 102 struct stat64 { 103 unsigned long long st_dev; 104 unsigned char __pad0[4]; 105 106 #define STAT64_HAS_BROKEN_ST_INO 1 107 unsigned long __st_ino; 108 109 unsigned int st_mode; 110 unsigned int st_nlink; 111 112 unsigned long st_uid; 113 unsigned long st_gid; 114 115 unsigned long long st_rdev; 116 unsigned char __pad3[4]; 117 118 long long st_size; 119 unsigned long st_blksize; 120 121 unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ 122 123 unsigned long st_atime; 124 unsigned long st_atime_nsec; 125 126 unsigned long st_mtime; 127 unsigned long st_mtime_nsec; 128 129 unsigned long st_ctime; 130 unsigned long st_ctime_nsec; 131 132 unsigned long long st_ino; 133 }; 134 135 #define STAT_HAVE_NSEC 1 136 #endif 137 138 #endif /* __ASM_SH_STAT_H */ 139