fcntl.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef _UAPI_LINUX_FCNTL_H
  2. #define _UAPI_LINUX_FCNTL_H
  3. #include <asm/fcntl.h>
  4. #define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
  5. #define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
  6. /*
  7. * Cancel a blocking posix lock; internal use only until we expose an
  8. * asynchronous lock api to userspace:
  9. */
  10. #define F_CANCELLK (F_LINUX_SPECIFIC_BASE + 5)
  11. /* Create a file descriptor with FD_CLOEXEC set. */
  12. #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6)
  13. /*
  14. * Request nofications on a directory.
  15. * See below for events that may be notified.
  16. */
  17. #define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
  18. /*
  19. * Set and get of pipe page size array
  20. */
  21. #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
  22. #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
  23. /*
  24. * Set/Get seals
  25. */
  26. #define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
  27. #define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
  28. /*
  29. * Types of seals
  30. */
  31. #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
  32. #define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
  33. #define F_SEAL_GROW 0x0004 /* prevent file from growing */
  34. #define F_SEAL_WRITE 0x0008 /* prevent writes */
  35. /* (1U << 31) is reserved for signed error codes */
  36. /*
  37. * Types of directory notifications that may be requested.
  38. */
  39. #define DN_ACCESS 0x00000001 /* File accessed */
  40. #define DN_MODIFY 0x00000002 /* File modified */
  41. #define DN_CREATE 0x00000004 /* File created */
  42. #define DN_DELETE 0x00000008 /* File removed */
  43. #define DN_RENAME 0x00000010 /* File renamed */
  44. #define DN_ATTRIB 0x00000020 /* File changed attibutes */
  45. #define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
  46. #define AT_FDCWD -100 /* Special value used to indicate
  47. openat should use the current
  48. working directory. */
  49. #define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
  50. #define AT_REMOVEDIR 0x200 /* Remove directory instead of
  51. unlinking file. */
  52. #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
  53. #define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */
  54. #define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */
  55. #endif /* _UAPI_LINUX_FCNTL_H */