Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inotify.c 906B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2006 Bernhard Kaindl <bk@suse.de>
  3. * Copyright (c) 2006-2018 Dmitry V. Levin <ldv@altlinux.org>
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: LGPL-2.1-or-later
  7. */
  8. #include "defs.h"
  9. #include <fcntl.h>
  10. #include "xlat/inotify_flags.h"
  11. #include "xlat/inotify_init_flags.h"
  12. SYS_FUNC(inotify_add_watch)
  13. {
  14. /* file descriptor */
  15. printfd(tcp, tcp->u_arg[0]);
  16. tprints(", ");
  17. /* pathname */
  18. printpath(tcp, tcp->u_arg[1]);
  19. tprints(", ");
  20. /* mask */
  21. printflags(inotify_flags, tcp->u_arg[2], "IN_???");
  22. return RVAL_DECODED;
  23. }
  24. SYS_FUNC(inotify_rm_watch)
  25. {
  26. /* file descriptor */
  27. printfd(tcp, tcp->u_arg[0]);
  28. /* watch descriptor */
  29. tprintf(", %d", (int) tcp->u_arg[1]);
  30. return RVAL_DECODED;
  31. }
  32. SYS_FUNC(inotify_init)
  33. {
  34. return RVAL_DECODED | RVAL_FD;
  35. }
  36. SYS_FUNC(inotify_init1)
  37. {
  38. printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
  39. return RVAL_DECODED | RVAL_FD;
  40. }