Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Paul Mundt | 17bfa63 | 2007-11-21 17:28:37 +0900 | [diff] [blame] | 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 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | struct stat { |
SUGIOKA Toshinobu | 760bcb1 | 2007-03-30 14:51:44 +0900 | [diff] [blame] | 79 | unsigned long st_dev; |
| 80 | unsigned long st_ino; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | unsigned short st_mode; |
| 82 | unsigned short st_nlink; |
| 83 | unsigned short st_uid; |
| 84 | unsigned short st_gid; |
SUGIOKA Toshinobu | 760bcb1 | 2007-03-30 14:51:44 +0900 | [diff] [blame] | 85 | unsigned long st_rdev; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
SUGIOKA Toshinobu | 760bcb1 | 2007-03-30 14:51:44 +0900 | [diff] [blame] | 106 | #define STAT64_HAS_BROKEN_ST_INO 1 |
| 107 | unsigned long __st_ino; |
| 108 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Takashi Sato | abcb6c9 | 2006-03-26 01:37:51 -0800 | [diff] [blame] | 121 | unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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; |
Paul Mundt | 17bfa63 | 2007-11-21 17:28:37 +0900 | [diff] [blame] | 130 | unsigned long st_ctime_nsec; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | |
SUGIOKA Toshinobu | 760bcb1 | 2007-03-30 14:51:44 +0900 | [diff] [blame] | 132 | unsigned long long st_ino; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | }; |
| 134 | |
SUGIOKA Toshinobu | 760bcb1 | 2007-03-30 14:51:44 +0900 | [diff] [blame] | 135 | #define STAT_HAVE_NSEC 1 |
Paul Mundt | 17bfa63 | 2007-11-21 17:28:37 +0900 | [diff] [blame] | 136 | #endif |
SUGIOKA Toshinobu | 760bcb1 | 2007-03-30 14:51:44 +0900 | [diff] [blame] | 137 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | #endif /* __ASM_SH_STAT_H */ |