1 /* Definition of `struct stat' used in the kernel. */ 2 struct kernel_stat 3 { 4 unsigned int st_dev; 5 unsigned int st_ino; 6 unsigned int st_mode; 7 unsigned int st_nlink; 8 unsigned int st_uid; 9 unsigned int st_gid; 10 unsigned int st_rdev; 11 long int st_size; 12 unsigned long int st_atime_sec; 13 unsigned long int st_mtime_sec; 14 unsigned long int st_ctime_sec; 15 unsigned int st_blksize; 16 int st_blocks; 17 unsigned int st_flags; 18 unsigned int st_gen; 19 }; 20 21 /* Definition of `struct stat64' used in the kernel. */ 22 struct kernel_stat64 23 { 24 unsigned long st_dev; 25 unsigned long st_ino; 26 unsigned long st_rdev; 27 long st_size; 28 unsigned long st_blocks; 29 30 unsigned int st_mode; 31 unsigned int st_uid; 32 unsigned int st_gid; 33 unsigned int st_blksize; 34 unsigned int st_nlink; 35 unsigned int __pad0; 36 37 unsigned long st_atime_sec; 38 unsigned long st_atimensec; 39 unsigned long st_mtime_sec; 40 unsigned long st_mtimensec; 41 unsigned long st_ctime_sec; 42 unsigned long st_ctimensec; 43 long __glibc_reserved[3]; 44 }; 45 46 /* Definition of `struct stat' used by glibc 2.0. */ 47 struct glibc2_stat 48 { 49 __dev_t st_dev; 50 __ino_t st_ino; 51 __mode_t st_mode; 52 __nlink_t st_nlink; 53 __uid_t st_uid; 54 __gid_t st_gid; 55 __dev_t st_rdev; 56 __off_t st_size; 57 __time_t st_atime_sec; 58 __time_t st_mtime_sec; 59 __time_t st_ctime_sec; 60 unsigned int st_blksize; 61 int st_blocks; 62 unsigned int st_flags; 63 unsigned int st_gen; 64 }; 65 66 /* Definition of `struct stat' used by glibc 2.1. */ 67 struct glibc21_stat 68 { 69 __dev_t st_dev; 70 __ino64_t st_ino; 71 __mode_t st_mode; 72 __nlink_t st_nlink; 73 __uid_t st_uid; 74 __gid_t st_gid; 75 __dev_t st_rdev; 76 __off_t st_size; 77 __time_t st_atime_sec; 78 __time_t st_mtime_sec; 79 __time_t st_ctime_sec; 80 __blkcnt64_t st_blocks; 81 __blksize_t st_blksize; 82 unsigned int st_flags; 83 unsigned int st_gen; 84 int __pad3; 85 long __glibc_reserved[4]; 86 }; 87 88 #define STAT_IS_KERNEL_STAT 0 89 #define STAT64_IS_KERNEL_STAT64 1 90 #define XSTAT_IS_XSTAT64 1 91 #define STATFS_IS_STATFS64 0 92