fanotify.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _LINUX_FANOTIFY_H
  2. #define _LINUX_FANOTIFY_H
  3. #include <linux/types.h>
  4. /* the following events that user-space can register for */
  5. #define FAN_ACCESS 0x00000001 /* File was accessed */
  6. #define FAN_MODIFY 0x00000002 /* File was modified */
  7. #define FAN_CLOSE_WRITE 0x00000008 /* Unwrittable file closed */
  8. #define FAN_CLOSE_NOWRITE 0x00000010 /* Writtable file closed */
  9. #define FAN_OPEN 0x00000020 /* File was opened */
  10. #define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */
  11. /* FIXME currently Q's have no limit.... */
  12. #define FAN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
  13. /* helper events */
  14. #define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */
  15. /*
  16. * All of the events - we build the list by hand so that we can add flags in
  17. * the future and not break backward compatibility. Apps will get only the
  18. * events that they originally wanted. Be sure to add new events here!
  19. */
  20. #define FAN_ALL_EVENTS (FAN_ACCESS |\
  21. FAN_MODIFY |\
  22. FAN_CLOSE |\
  23. FAN_OPEN)
  24. /*
  25. * All legal FAN bits userspace can request (although possibly not all
  26. * at the same time.
  27. */
  28. #define FAN_ALL_INCOMING_EVENTS (FAN_ALL_EVENTS |\
  29. FAN_EVENT_ON_CHILD)
  30. #ifdef __KERNEL__
  31. #endif /* __KERNEL__ */
  32. #endif /* _LINUX_FANOTIFY_H */