~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/trace/beauty/include/uapi/linux/fcntl.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _UAPI_LINUX_FCNTL_H
  3 #define _UAPI_LINUX_FCNTL_H
  4 
  5 #include <asm/fcntl.h>
  6 #include <linux/openat2.h>
  7 
  8 #define F_SETLEASE      (F_LINUX_SPECIFIC_BASE + 0)
  9 #define F_GETLEASE      (F_LINUX_SPECIFIC_BASE + 1)
 10 
 11 /*
 12  * Request nofications on a directory.
 13  * See below for events that may be notified.
 14  */
 15 #define F_NOTIFY        (F_LINUX_SPECIFIC_BASE + 2)
 16 
 17 #define F_DUPFD_QUERY   (F_LINUX_SPECIFIC_BASE + 3)
 18 
 19 /*
 20  * Cancel a blocking posix lock; internal use only until we expose an
 21  * asynchronous lock api to userspace:
 22  */
 23 #define F_CANCELLK      (F_LINUX_SPECIFIC_BASE + 5)
 24 
 25 /* Create a file descriptor with FD_CLOEXEC set. */
 26 #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6)
 27 
 28 /*
 29  * Set and get of pipe page size array
 30  */
 31 #define F_SETPIPE_SZ    (F_LINUX_SPECIFIC_BASE + 7)
 32 #define F_GETPIPE_SZ    (F_LINUX_SPECIFIC_BASE + 8)
 33 
 34 /*
 35  * Set/Get seals
 36  */
 37 #define F_ADD_SEALS     (F_LINUX_SPECIFIC_BASE + 9)
 38 #define F_GET_SEALS     (F_LINUX_SPECIFIC_BASE + 10)
 39 
 40 /*
 41  * Types of seals
 42  */
 43 #define F_SEAL_SEAL     0x0001  /* prevent further seals from being set */
 44 #define F_SEAL_SHRINK   0x0002  /* prevent file from shrinking */
 45 #define F_SEAL_GROW     0x0004  /* prevent file from growing */
 46 #define F_SEAL_WRITE    0x0008  /* prevent writes */
 47 #define F_SEAL_FUTURE_WRITE     0x0010  /* prevent future writes while mapped */
 48 #define F_SEAL_EXEC     0x0020  /* prevent chmod modifying exec bits */
 49 /* (1U << 31) is reserved for signed error codes */
 50 
 51 /*
 52  * Set/Get write life time hints. {GET,SET}_RW_HINT operate on the
 53  * underlying inode, while {GET,SET}_FILE_RW_HINT operate only on
 54  * the specific file.
 55  */
 56 #define F_GET_RW_HINT           (F_LINUX_SPECIFIC_BASE + 11)
 57 #define F_SET_RW_HINT           (F_LINUX_SPECIFIC_BASE + 12)
 58 #define F_GET_FILE_RW_HINT      (F_LINUX_SPECIFIC_BASE + 13)
 59 #define F_SET_FILE_RW_HINT      (F_LINUX_SPECIFIC_BASE + 14)
 60 
 61 /*
 62  * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
 63  * used to clear any hints previously set.
 64  */
 65 #define RWH_WRITE_LIFE_NOT_SET  0
 66 #define RWH_WRITE_LIFE_NONE     1
 67 #define RWH_WRITE_LIFE_SHORT    2
 68 #define RWH_WRITE_LIFE_MEDIUM   3
 69 #define RWH_WRITE_LIFE_LONG     4
 70 #define RWH_WRITE_LIFE_EXTREME  5
 71 
 72 /*
 73  * The originally introduced spelling is remained from the first
 74  * versions of the patch set that introduced the feature, see commit
 75  * v4.13-rc1~212^2~51.
 76  */
 77 #define RWF_WRITE_LIFE_NOT_SET  RWH_WRITE_LIFE_NOT_SET
 78 
 79 /*
 80  * Types of directory notifications that may be requested.
 81  */
 82 #define DN_ACCESS       0x00000001      /* File accessed */
 83 #define DN_MODIFY       0x00000002      /* File modified */
 84 #define DN_CREATE       0x00000004      /* File created */
 85 #define DN_DELETE       0x00000008      /* File removed */
 86 #define DN_RENAME       0x00000010      /* File renamed */
 87 #define DN_ATTRIB       0x00000020      /* File changed attibutes */
 88 #define DN_MULTISHOT    0x80000000      /* Don't remove notifier */
 89 
 90 /*
 91  * The constants AT_REMOVEDIR and AT_EACCESS have the same value.  AT_EACCESS is
 92  * meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to
 93  * unlinkat.  The two functions do completely different things and therefore,
 94  * the flags can be allowed to overlap.  For example, passing AT_REMOVEDIR to
 95  * faccessat would be undefined behavior and thus treating it equivalent to
 96  * AT_EACCESS is valid undefined behavior.
 97  */
 98 #define AT_FDCWD                -100    /* Special value used to indicate
 99                                            openat should use the current
100                                            working directory. */
101 #define AT_SYMLINK_NOFOLLOW     0x100   /* Do not follow symbolic links.  */
102 #define AT_EACCESS              0x200   /* Test access permitted for
103                                            effective IDs, not real IDs.  */
104 #define AT_REMOVEDIR            0x200   /* Remove directory instead of
105                                            unlinking file.  */
106 #define AT_SYMLINK_FOLLOW       0x400   /* Follow symbolic links.  */
107 #define AT_NO_AUTOMOUNT         0x800   /* Suppress terminal automount traversal */
108 #define AT_EMPTY_PATH           0x1000  /* Allow empty relative pathname */
109 
110 #define AT_STATX_SYNC_TYPE      0x6000  /* Type of synchronisation required from statx() */
111 #define AT_STATX_SYNC_AS_STAT   0x0000  /* - Do whatever stat() does */
112 #define AT_STATX_FORCE_SYNC     0x2000  /* - Force the attributes to be sync'd with the server */
113 #define AT_STATX_DONT_SYNC      0x4000  /* - Don't sync attributes with the server */
114 
115 #define AT_RECURSIVE            0x8000  /* Apply to the entire subtree */
116 
117 /* Flags for name_to_handle_at(2). We reuse AT_ flag space to save bits... */
118 #define AT_HANDLE_FID           AT_REMOVEDIR    /* file handle is needed to
119                                         compare object identity and may not
120                                         be usable to open_by_handle_at(2) */
121 #if defined(__KERNEL__)
122 #define AT_GETATTR_NOSEC        0x80000000
123 #endif
124 
125 #endif /* _UAPI_LINUX_FCNTL_H */
126 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php