| 1 | #ifndef __ASM_GENERIC_STAT_H
|
| 2 | #define __ASM_GENERIC_STAT_H
|
| 3 |
|
| 4 | |
| 5 | * Everybody gets this wrong and has to stick with it for all
|
| 6 | * eternity. Hopefully, this version gets used by new architectures
|
| 7 | * so they don't fall into the same traps.
|
| 8 | *
|
| 9 | * stat64 is copied from powerpc64, with explicit padding added.
|
| 10 | * stat is the same structure layout on 64-bit, without the 'long long'
|
| 11 | * types.
|
| 12 | *
|
| 13 | * By convention, 64 bit architectures use the stat interface, while
|
| 14 | * 32 bit architectures use the stat64 interface. Note that we don't
|
| 15 | * provide an __old_kernel_stat here, which new architecture should
|
| 16 | * not have to start with.
|
| 17 |
|
| 18 |
|
| 19 | #include <asm/bitsperlong.h>
|
| 20 |
|
| 21 | #define STAT_HAVE_NSEC 1
|
| 22 |
|
| 23 | struct stat {
|
| 24 | unsigned long st_dev;
|
| 25 | unsigned long st_ino;
|
| 26 | unsigned int st_mode;
|
| 27 | unsigned int st_nlink;
|
| 28 | unsigned int st_uid;
|
| 29 | unsigned int st_gid;
|
| 30 | unsigned long st_rdev;
|
| 31 | unsigned long __pad1;
|
| 32 | long st_size;
|
| 33 | int st_blksize;
|
| 34 | int __pad2;
|
| 35 | long st_blocks;
|
| 36 | long st_atime;
|
| 37 | unsigned long st_atime_nsec;
|
| 38 | long st_mtime;
|
| 39 | unsigned long st_mtime_nsec;
|
| 40 | long st_ctime;
|
| 41 | unsigned long st_ctime_nsec;
|
| 42 | unsigned int __unused4;
|
| 43 | unsigned int __unused5;
|
| 44 | };
|
| 45 |
|
| 46 |
|
| 47 | #if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64)
|
| 48 | struct stat64 {
|
| 49 | unsigned long long st_dev;
|
| 50 | unsigned long long st_ino;
|
| 51 | unsigned int st_mode;
|
| 52 | unsigned int st_nlink;
|
| 53 | unsigned int st_uid;
|
| 54 | unsigned int st_gid;
|
| 55 | unsigned long long st_rdev;
|
| 56 | unsigned long long __pad1;
|
| 57 | long long st_size;
|
| 58 | int st_blksize;
|
| 59 | int __pad2;
|
| 60 | long long st_blocks;
|
| 61 | int st_atime;
|
| 62 | unsigned int st_atime_nsec;
|
| 63 | int st_mtime;
|
| 64 | unsigned int st_mtime_nsec;
|
| 65 | int st_ctime;
|
| 66 | unsigned int st_ctime_nsec;
|
| 67 | unsigned int __unused4;
|
| 68 | unsigned int __unused5;
|
| 69 | };
|
| 70 | #endif
|
| 71 |
|
| 72 | #endif
|