June 2025 | ||||||
Mo | Tu | We | Th | Fr | Sa | Su |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 1 | 2 | 3 | 4 | 5 | 6 |
01: #ifndef __ASM_GENERIC_STAT_H 02: #define __ASM_GENERIC_STAT_H 03: 04: /* 05: * Everybody gets this wrong and has to stick with it for all 06: * eternity. Hopefully, this version gets used by new architectures 07: * so they don't fall into the same traps. 08: * 09: * 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; /* Device. */ 25: unsigned long st_ino; /* File serial number. */ 26: unsigned int st_mode; /* File mode. */ 27: unsigned int st_nlink; /* Link count. */ 28: unsigned int st_uid; /* User ID of the file's owner. */ 29: unsigned int st_gid; /* Group ID of the file's group. */ 30: unsigned long st_rdev; /* Device number, if device. */ 31: unsigned long __pad1; 32: long st_size; /* Size of file, in bytes. */ 33: int st_blksize; /* Optimal block size for I/O. */ 34: int __pad2; 35: long st_blocks; /* Number 512-byte blocks allocated. */ 36: long st_atime; /* Time of last access. */ 37: unsigned long st_atime_nsec; 38: long st_mtime; /* Time of last modification. */ 39: unsigned long st_mtime_nsec; 40: long st_ctime; /* Time of last status change. */ 41: unsigned long st_ctime_nsec; 42: unsigned int __unused4; 43: unsigned int __unused5; 44: }; 45: 46: /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ 47: #if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64) 48: struct stat64 { 49: unsigned long long st_dev; /* Device. */ 50: unsigned long long st_ino; /* File serial number. */ 51: unsigned int st_mode; /* File mode. */ 52: unsigned int st_nlink; /* Link count. */ 53: unsigned int st_uid; /* User ID of the file's owner. */ 54: unsigned int st_gid; /* Group ID of the file's group. */ 55: unsigned long long st_rdev; /* Device number, if device. */ 56: unsigned long long __pad1; 57: long long st_size; /* Size of file, in bytes. */ 58: int st_blksize; /* Optimal block size for I/O. */ 59: int __pad2; 60: long long st_blocks; /* Number 512-byte blocks allocated. */ 61: int st_atime; /* Time of last access. */ 62: unsigned int st_atime_nsec; 63: int st_mtime; /* Time of last modification. */ 64: unsigned int st_mtime_nsec; 65: int st_ctime; /* Time of last status change. */ 66: unsigned int st_ctime_nsec; 67: unsigned int __unused4; 68: unsigned int __unused5; 69: }; 70: #endif 71: 72: #endif /* __ASM_GENERIC_STAT_H */ 73: