inotify.c 810 B

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