aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-xtensa/stat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-xtensa/stat.h')
-rw-r--r--include/asm-xtensa/stat.h112
1 files changed, 38 insertions, 74 deletions
diff --git a/include/asm-xtensa/stat.h b/include/asm-xtensa/stat.h
index 2f4662ff6c3a..149f4bce092f 100644
--- a/include/asm-xtensa/stat.h
+++ b/include/asm-xtensa/stat.h
@@ -13,93 +13,57 @@
13 13
14#include <linux/types.h> 14#include <linux/types.h>
15 15
16struct __old_kernel_stat {
17 unsigned short st_dev;
18 unsigned short st_ino;
19 unsigned short st_mode;
20 unsigned short st_nlink;
21 unsigned short st_uid;
22 unsigned short st_gid;
23 unsigned short st_rdev;
24 unsigned long st_size;
25 unsigned long st_atime;
26 unsigned long st_mtime;
27 unsigned long st_ctime;
28};
29
30#define STAT_HAVE_NSEC 1 16#define STAT_HAVE_NSEC 1
31 17
32struct stat { 18struct stat {
33 unsigned short st_dev; 19 unsigned long st_dev;
34 unsigned short __pad1; 20 ino_t st_ino;
35 unsigned long st_ino; 21 mode_t st_mode;
36 unsigned short st_mode; 22 nlink_t st_nlink;
37 unsigned short st_nlink; 23 uid_t st_uid;
38 unsigned short st_uid; 24 gid_t st_gid;
39 unsigned short st_gid; 25 unsigned int st_rdev;
40 unsigned short st_rdev; 26 off_t st_size;
41 unsigned short __pad2; 27 unsigned long st_blksize;
42 unsigned long st_size; 28 unsigned long st_blocks;
43 unsigned long st_blksize; 29 unsigned long st_atime;
44 unsigned long st_blocks; 30 unsigned long st_atime_nsec;
45 unsigned long st_atime; 31 unsigned long st_mtime;
46 unsigned long st_atime_nsec; 32 unsigned long st_mtime_nsec;
47 unsigned long st_mtime; 33 unsigned long st_ctime;
48 unsigned long st_mtime_nsec; 34 unsigned long st_ctime_nsec;
49 unsigned long st_ctime; 35 unsigned long __unused4;
50 unsigned long st_ctime_nsec; 36 unsigned long __unused5;
51 unsigned long __unused4;
52 unsigned long __unused5;
53}; 37};
54 38
55/* This matches struct stat64 in glibc-2.2.3. */ 39/* This matches struct stat64 in glibc-2.3 */
56 40
57struct stat64 { 41struct stat64 {
58#ifdef __XTENSA_EL__ 42 unsigned long long st_dev; /* Device */
59 unsigned short st_dev; /* Device */ 43 unsigned long long st_ino; /* File serial number */
60 unsigned char __pad0[10];
61#else
62 unsigned char __pad0[6];
63 unsigned short st_dev;
64 unsigned char __pad1[2];
65#endif
66
67#define STAT64_HAS_BROKEN_ST_INO 1
68 unsigned long __st_ino; /* 32bit file serial number. */
69
70 unsigned int st_mode; /* File mode. */ 44 unsigned int st_mode; /* File mode. */
71 unsigned int st_nlink; /* Link count. */ 45 unsigned int st_nlink; /* Link count. */
72 unsigned int st_uid; /* User ID of the file's owner. */ 46 unsigned int st_uid; /* User ID of the file's owner. */
73 unsigned int st_gid; /* Group ID of the file's group. */ 47 unsigned int st_gid; /* Group ID of the file's group. */
74 48 unsigned long long st_rdev; /* Device number, if device. */
75#ifdef __XTENSA_EL__ 49 long long st_size; /* Size of file, in bytes. */
76 unsigned short st_rdev; /* Device number, if device. */ 50 long st_blksize; /* Optimal block size for I/O. */
77 unsigned char __pad3[10]; 51 unsigned long __unused2;
78#else 52#ifdef __XTENSA_EB__
79 unsigned char __pad2[6]; 53 unsigned long __unused3;
80 unsigned short st_rdev; 54 long st_blocks; /* Number 512-byte blocks allocated. */
81 unsigned char __pad3[2];
82#endif
83
84 long long int st_size; /* Size of file, in bytes. */
85 long int st_blksize; /* Optimal block size for I/O. */
86
87#ifdef __XTENSA_EL__
88 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
89 unsigned long __pad4;
90#else 55#else
91 unsigned long __pad4; 56 long st_blocks; /* Number 512-byte blocks allocated. */
92 unsigned long st_blocks; 57 unsigned long __unused3;
93#endif 58#endif
94 59 long st_atime; /* Time of last access. */
95 unsigned long __pad5; 60 unsigned long st_atime_nsec;
96 long int st_atime; /* Time of last access. */ 61 long st_mtime; /* Time of last modification. */
97 unsigned long st_atime_nsec; 62 unsigned long st_mtime_nsec;
98 long int st_mtime; /* Time of last modification. */ 63 long st_ctime; /* Time of last status change. */
99 unsigned long st_mtime_nsec; 64 unsigned long st_ctime_nsec;
100 long int st_ctime; /* Time of last status change. */ 65 unsigned long __unused4;
101 unsigned long st_ctime_nsec; 66 unsigned long __unused5;
102 unsigned long long int st_ino; /* File serial number. */
103}; 67};
104 68
105#endif /* _XTENSA_STAT_H */ 69#endif /* _XTENSA_STAT_H */