1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _ASM_X86_STAT_H 20 #define _ASM_X86_STAT_H 21 #include <asm/posix_types.h> 22 #define STAT_HAVE_NSEC 1 23 #ifdef __i386__ 24 struct stat { 25 unsigned long st_dev; 26 unsigned long st_ino; 27 unsigned short st_mode; 28 unsigned short st_nlink; 29 unsigned short st_uid; 30 unsigned short st_gid; 31 unsigned long st_rdev; 32 unsigned long st_size; 33 unsigned long st_blksize; 34 unsigned long st_blocks; 35 unsigned long st_atime; 36 unsigned long st_atime_nsec; 37 unsigned long st_mtime; 38 unsigned long st_mtime_nsec; 39 unsigned long st_ctime; 40 unsigned long st_ctime_nsec; 41 unsigned long __unused4; 42 unsigned long __unused5; 43 }; 44 #define INIT_STRUCT_STAT_PADDING(st) do { st.__unused4 = 0; st.__unused5 = 0; \ 45 } while(0) 46 #define STAT64_HAS_BROKEN_ST_INO 1 47 struct stat64 { 48 unsigned long long st_dev; 49 unsigned char __pad0[4]; 50 unsigned long __st_ino; 51 unsigned int st_mode; 52 unsigned int st_nlink; 53 unsigned long st_uid; 54 unsigned long st_gid; 55 unsigned long long st_rdev; 56 unsigned char __pad3[4]; 57 long long st_size; 58 unsigned long st_blksize; 59 unsigned long long st_blocks; 60 unsigned long st_atime; 61 unsigned long st_atime_nsec; 62 unsigned long st_mtime; 63 unsigned int st_mtime_nsec; 64 unsigned long st_ctime; 65 unsigned long st_ctime_nsec; 66 unsigned long long st_ino; 67 }; 68 #define INIT_STRUCT_STAT64_PADDING(st) do { memset(& st.__pad0, 0, sizeof(st.__pad0)); memset(& st.__pad3, 0, sizeof(st.__pad3)); \ 69 } while(0) 70 #else 71 struct stat { 72 __kernel_ulong_t st_dev; 73 __kernel_ulong_t st_ino; 74 __kernel_ulong_t st_nlink; 75 unsigned int st_mode; 76 unsigned int st_uid; 77 unsigned int st_gid; 78 unsigned int __pad0; 79 __kernel_ulong_t st_rdev; 80 __kernel_long_t st_size; 81 __kernel_long_t st_blksize; 82 __kernel_long_t st_blocks; 83 __kernel_ulong_t st_atime; 84 __kernel_ulong_t st_atime_nsec; 85 __kernel_ulong_t st_mtime; 86 __kernel_ulong_t st_mtime_nsec; 87 __kernel_ulong_t st_ctime; 88 __kernel_ulong_t st_ctime_nsec; 89 __kernel_long_t __linux_unused[3]; 90 }; 91 #define INIT_STRUCT_STAT_PADDING(st) do { st.__pad0 = 0; st.__linux_unused[0] = 0; st.__linux_unused[1] = 0; st.__linux_unused[2] = 0; \ 92 } while(0) 93 #endif 94 struct __old_kernel_stat { 95 unsigned short st_dev; 96 unsigned short st_ino; 97 unsigned short st_mode; 98 unsigned short st_nlink; 99 unsigned short st_uid; 100 unsigned short st_gid; 101 unsigned short st_rdev; 102 #ifdef __i386__ 103 unsigned long st_size; 104 unsigned long st_atime; 105 unsigned long st_mtime; 106 unsigned long st_ctime; 107 #else 108 unsigned int st_size; 109 unsigned int st_atime; 110 unsigned int st_mtime; 111 unsigned int st_ctime; 112 #endif 113 }; 114 #endif 115