dnotify.h 978 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef _LINUX_DNOTIFY_H
  2. #define _LINUX_DNOTIFY_H
  3. /*
  4. * Directory notification for Linux
  5. *
  6. * Copyright (C) 2000,2002 Stephen Rothwell
  7. */
  8. #include <linux/fs.h>
  9. struct dnotify_struct {
  10. struct dnotify_struct * dn_next;
  11. __u32 dn_mask;
  12. int dn_fd;
  13. struct file * dn_filp;
  14. fl_owner_t dn_owner;
  15. };
  16. #ifdef __KERNEL__
  17. #ifdef CONFIG_DNOTIFY
  18. #define DNOTIFY_ALL_EVENTS (FS_DELETE | FS_DELETE_CHILD |\
  19. FS_MODIFY | FS_MODIFY_CHILD |\
  20. FS_ACCESS | FS_ACCESS_CHILD |\
  21. FS_ATTRIB | FS_ATTRIB_CHILD |\
  22. FS_CREATE | FS_DN_RENAME |\
  23. FS_MOVED_FROM | FS_MOVED_TO)
  24. extern void dnotify_flush(struct file *, fl_owner_t);
  25. extern int fcntl_dirnotify(int, struct file *, unsigned long);
  26. #else
  27. static inline void dnotify_flush(struct file *filp, fl_owner_t id)
  28. {
  29. }
  30. static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
  31. {
  32. return -EINVAL;
  33. }
  34. #endif /* CONFIG_DNOTIFY */
  35. #endif /* __KERNEL __ */
  36. #endif /* _LINUX_DNOTIFY_H */