1 #ifndef _BITS_STAT_STRUCT_H 2 #define _BITS_STAT_STRUCT_H 3 4 /* This file provides whatever this particular arch's kernel thinks 5 * struct kernel_stat should look like... It turns out each arch has a 6 * different opinion on the subject... */ 7 #include <endian.h> 8 9 struct kernel_stat { 10 unsigned short st_dev; 11 unsigned short __pad1; 12 unsigned long st_ino; 13 unsigned short st_mode; 14 unsigned short st_nlink; 15 unsigned short st_uid; 16 unsigned short st_gid; 17 unsigned short st_rdev; 18 unsigned short __pad2; 19 unsigned long st_size; 20 unsigned long st_blksize; 21 unsigned long st_blocks; 22 struct timespec st_atim; 23 struct timespec st_mtim; 24 struct timespec st_ctim; 25 unsigned long __uclibc_unused4; 26 unsigned long __uclibc_unused5; 27 }; 28 29 struct kernel_stat64 { 30 #if (__BYTE_ORDER == __BIG_ENDIAN) 31 unsigned char __pad0b[6]; 32 unsigned short st_dev; 33 #elif (__BYTE_ORDER == __LITTLE_ENDIAN) 34 unsigned short st_dev; 35 unsigned char __pad0b[6]; 36 #else 37 #error Must know endian to build stat64 structure! 38 #endif 39 unsigned char __pad0[4]; 40 41 unsigned long st_ino; 42 unsigned int st_mode; 43 unsigned int st_nlink; 44 45 unsigned long st_uid; 46 unsigned long st_gid; 47 48 #if (__BYTE_ORDER == __BIG_ENDIAN) 49 unsigned char __pad3b[6]; 50 unsigned short st_rdev; 51 #else /* Must be little */ 52 unsigned short st_rdev; 53 unsigned char __pad3b[6]; 54 #endif 55 unsigned char __pad3[4]; 56 57 long long st_size; 58 unsigned long st_blksize; 59 60 #if (__BYTE_ORDER == __BIG_ENDIAN) 61 unsigned long __pad4; /* Future possible st_blocks hi bits */ 62 unsigned long st_blocks; /* Number 512-byte blocks allocated. */ 63 #else /* Must be little */ 64 unsigned long st_blocks; /* Number 512-byte blocks allocated. */ 65 unsigned long __pad4; /* Future possible st_blocks hi bits */ 66 #endif 67 68 struct timespec st_atim; 69 struct timespec st_mtim; 70 struct timespec st_ctim; 71 72 unsigned long __unused1; 73 unsigned long __unused2; 74 }; 75 76 #endif /* _BITS_STAT_STRUCT_H */ 77 78