inotify.c 785 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * inotify interface for uClibc
  3. *
  4. * Copyright (C) 2006 Austin Morgan <admorgan@morgancomputers.net>
  5. * Copyright (C) 2006 by Erik Andersen <andersen@codepoet.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include <sys/syscall.h>
  10. #include <sys/inotify.h>
  11. #ifdef __NR_inotify_init
  12. _syscall0(int, inotify_init)
  13. #endif
  14. #ifdef __NR_inotify_init1
  15. _syscall1(int, inotify_init1, int, flags)
  16. #endif
  17. #if defined __NR_inotify_init1 && !defined __NR_inotify_init
  18. int inotify_init(void)
  19. {
  20. return INLINE_SYSCALL(inotify_init1, 1, 0);
  21. }
  22. #endif
  23. #ifdef __NR_inotify_add_watch
  24. _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
  25. #endif
  26. #ifdef __NR_inotify_rm_watch
  27. _syscall2(int, inotify_rm_watch, int, fd, int, wd)
  28. #endif