1 #ifndef _UAPI_LINUX_FCNTL_H 2 #define _UAPI_LINUX_FCNTL_H 3 4 #include <asm/fcntl.h> 5 6 #define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0) 7 #define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1) 8 9 /* 10 * Cancel a blocking posix lock; internal use only until we expose an 11 * asynchronous lock api to userspace: 12 */ 13 #define F_CANCELLK (F_LINUX_SPECIFIC_BASE + 5) 14 15 /* Create a file descriptor with FD_CLOEXEC set. */ 16 #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6) 17 18 /* 19 * Request nofications on a directory. 20 * See below for events that may be notified. 21 */ 22 #define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2) 23 24 /* 25 * Set and get of pipe page size array 26 */ 27 #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) 28 #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) 29 30 /* 31 * Set/Get seals 32 */ 33 #define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) 34 #define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) 35 36 /* 37 * Types of seals 38 */ 39 #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ 40 #define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ 41 #define F_SEAL_GROW 0x0004 /* prevent file from growing */ 42 #define F_SEAL_WRITE 0x0008 /* prevent writes */ 43 /* (1U << 31) is reserved for signed error codes */ 44 45 /* 46 * Set/Get write life time hints. {GET,SET}_RW_HINT operate on the 47 * underlying inode, while {GET,SET}_FILE_RW_HINT operate only on 48 * the specific file. 49 */ 50 #define F_GET_RW_HINT (F_LINUX_SPECIFIC_BASE + 11) 51 #define F_SET_RW_HINT (F_LINUX_SPECIFIC_BASE + 12) 52 #define F_GET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 13) 53 #define F_SET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 14) 54 55 /* 56 * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be 57 * used to clear any hints previously set. 58 */ 59 #define RWF_WRITE_LIFE_NOT_SET 0 60 #define RWH_WRITE_LIFE_NONE 1 61 #define RWH_WRITE_LIFE_SHORT 2 62 #define RWH_WRITE_LIFE_MEDIUM 3 63 #define RWH_WRITE_LIFE_LONG 4 64 #define RWH_WRITE_LIFE_EXTREME 5 65 66 /* 67 * Types of directory notifications that may be requested. 68 */ 69 #define DN_ACCESS 0x00000001 /* File accessed */ 70 #define DN_MODIFY 0x00000002 /* File modified */ 71 #define DN_CREATE 0x00000004 /* File created */ 72 #define DN_DELETE 0x00000008 /* File removed */ 73 #define DN_RENAME 0x00000010 /* File renamed */ 74 #define DN_ATTRIB 0x00000020 /* File changed attibutes */ 75 #define DN_MULTISHOT 0x80000000 /* Don't remove notifier */ 76 77 #define AT_FDCWD -100 /* Special value used to indicate 78 openat should use the current 79 working directory. */ 80 #define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ 81 #define AT_REMOVEDIR 0x200 /* Remove directory instead of 82 unlinking file. */ 83 #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ 84 #define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */ 85 #define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ 86 87 #define AT_STATX_SYNC_TYPE 0x6000 /* Type of synchronisation required from statx() */ 88 #define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */ 89 #define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */ 90 #define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */ 91 92 93 #endif /* _UAPI_LINUX_FCNTL_H */ 94