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