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.

renameat.c 645B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2014-2019 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #include "defs.h"
  8. static void
  9. decode_renameat(struct tcb *tcp)
  10. {
  11. print_dirfd(tcp, tcp->u_arg[0]);
  12. tprints(", ");
  13. printpath(tcp, tcp->u_arg[1]);
  14. tprints(", ");
  15. print_dirfd(tcp, tcp->u_arg[2]);
  16. tprints(", ");
  17. printpath(tcp, tcp->u_arg[3]);
  18. }
  19. SYS_FUNC(renameat)
  20. {
  21. decode_renameat(tcp);
  22. return RVAL_DECODED;
  23. }
  24. #include <linux/fs.h>
  25. #include "xlat/rename_flags.h"
  26. SYS_FUNC(renameat2)
  27. {
  28. decode_renameat(tcp);
  29. tprints(", ");
  30. printflags(rename_flags, tcp->u_arg[4], "RENAME_??");
  31. return RVAL_DECODED;
  32. }