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 613B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2014-2018 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. printpath(tcp, tcp->u_arg[1]);
  13. tprints(", ");
  14. print_dirfd(tcp, tcp->u_arg[2]);
  15. printpath(tcp, tcp->u_arg[3]);
  16. }
  17. SYS_FUNC(renameat)
  18. {
  19. decode_renameat(tcp);
  20. return RVAL_DECODED;
  21. }
  22. #include <linux/fs.h>
  23. #include "xlat/rename_flags.h"
  24. SYS_FUNC(renameat2)
  25. {
  26. decode_renameat(tcp);
  27. tprints(", ");
  28. printflags(rename_flags, tcp->u_arg[4], "RENAME_??");
  29. return RVAL_DECODED;
  30. }