1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _UAPI_LINUX_STAT_H 8 #define _UAPI_LINUX_STAT_H 9 #include <linux/types.h> 10 #if !defined(__GLIBC__) || __GLIBC__ < 2 11 #define S_IFMT 00170000 12 #define S_IFSOCK 0140000 13 #define S_IFLNK 0120000 14 #define S_IFREG 0100000 15 #define S_IFBLK 0060000 16 #define S_IFDIR 0040000 17 #define S_IFCHR 0020000 18 #define S_IFIFO 0010000 19 #define S_ISUID 0004000 20 #define S_ISGID 0002000 21 #define S_ISVTX 0001000 22 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 23 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 24 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 25 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 26 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) 27 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 28 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) 29 #define S_IRWXU 00700 30 #define S_IRUSR 00400 31 #define S_IWUSR 00200 32 #define S_IXUSR 00100 33 #define S_IRWXG 00070 34 #define S_IRGRP 00040 35 #define S_IWGRP 00020 36 #define S_IXGRP 00010 37 #define S_IRWXO 00007 38 #define S_IROTH 00004 39 #define S_IWOTH 00002 40 #define S_IXOTH 00001 41 #endif 42 struct statx_timestamp { 43 __s64 tv_sec; 44 __u32 tv_nsec; 45 __s32 __reserved; 46 }; 47 struct statx { 48 __u32 stx_mask; 49 __u32 stx_blksize; 50 __u64 stx_attributes; 51 __u32 stx_nlink; 52 __u32 stx_uid; 53 __u32 stx_gid; 54 __u16 stx_mode; 55 __u16 __spare0[1]; 56 __u64 stx_ino; 57 __u64 stx_size; 58 __u64 stx_blocks; 59 __u64 stx_attributes_mask; 60 struct statx_timestamp stx_atime; 61 struct statx_timestamp stx_btime; 62 struct statx_timestamp stx_ctime; 63 struct statx_timestamp stx_mtime; 64 __u32 stx_rdev_major; 65 __u32 stx_rdev_minor; 66 __u32 stx_dev_major; 67 __u32 stx_dev_minor; 68 __u64 stx_mnt_id; 69 __u32 stx_dio_mem_align; 70 __u32 stx_dio_offset_align; 71 __u64 __spare3[12]; 72 }; 73 #define STATX_TYPE 0x00000001U 74 #define STATX_MODE 0x00000002U 75 #define STATX_NLINK 0x00000004U 76 #define STATX_UID 0x00000008U 77 #define STATX_GID 0x00000010U 78 #define STATX_ATIME 0x00000020U 79 #define STATX_MTIME 0x00000040U 80 #define STATX_CTIME 0x00000080U 81 #define STATX_INO 0x00000100U 82 #define STATX_SIZE 0x00000200U 83 #define STATX_BLOCKS 0x00000400U 84 #define STATX_BASIC_STATS 0x000007ffU 85 #define STATX_BTIME 0x00000800U 86 #define STATX_MNT_ID 0x00001000U 87 #define STATX_DIOALIGN 0x00002000U 88 #define STATX_MNT_ID_UNIQUE 0x00004000U 89 #define STATX__RESERVED 0x80000000U 90 #define STATX_ALL 0x00000fffU 91 #define STATX_ATTR_COMPRESSED 0x00000004 92 #define STATX_ATTR_IMMUTABLE 0x00000010 93 #define STATX_ATTR_APPEND 0x00000020 94 #define STATX_ATTR_NODUMP 0x00000040 95 #define STATX_ATTR_ENCRYPTED 0x00000800 96 #define STATX_ATTR_AUTOMOUNT 0x00001000 97 #define STATX_ATTR_MOUNT_ROOT 0x00002000 98 #define STATX_ATTR_VERITY 0x00100000 99 #define STATX_ATTR_DAX 0x00200000 100 #endif 101