chiark / gitweb /
42b1409f67b79a70d7309299fa2ea7ec80fa1004
[elogind.git] / klibc / include / arch / arm / klibc / archstat.h
1 #ifndef _KLIBC_ARCHSTAT_H
2 #define _KLIBC_ARCHSTAT_H
3
4 #include <endian.h>
5
6 #define _STATBUF_ST_NSEC
7
8 /* This matches struct stat64 in glibc2.1, hence the absolutely
9  * insane amounts of padding around dev_t's.
10  * Note: The kernel zero's the padded region because glibc might read them
11  * in the hope that the kernel has stretched to using larger sizes.
12  */
13 struct stat {
14         unsigned long long      st_dev;
15         unsigned char   __pad0[4];
16
17         unsigned long   __st_ino;
18         unsigned int    st_mode;
19         unsigned int    st_nlink;
20
21         unsigned long   st_uid;
22         unsigned long   st_gid;
23
24         unsigned long long      st_rdev;
25         unsigned char   __pad3[4];
26
27         long long       st_size;
28         unsigned long   st_blksize;
29
30 #if __BYTE_ORDER == __BIG_ENDIAN
31         unsigned long   __pad4;         /* Future possible st_blocks hi bits */
32         unsigned long   st_blocks;      /* Number 512-byte blocks allocated. */
33 #else /* Must be little */
34         unsigned long   st_blocks;      /* Number 512-byte blocks allocated. */
35         unsigned long   __pad4;         /* Future possible st_blocks hi bits */
36 #endif
37
38         struct timespec st_atim;
39         struct timespec st_mtim;
40         struct timespec st_ctim;
41
42         unsigned long long      st_ino;
43 };
44
45 #endif