]> granicus.if.org Git - strace/blob - renameat.c
Fix ILP32 personality preadv/pwritev offset decoding on LP64 architectures
[strace] / renameat.c
1 #include "defs.h"
2
3 static void
4 decode_renameat(struct tcb *tcp)
5 {
6         print_dirfd(tcp, tcp->u_arg[0]);
7         printpath(tcp, tcp->u_arg[1]);
8         tprints(", ");
9         print_dirfd(tcp, tcp->u_arg[2]);
10         printpath(tcp, tcp->u_arg[3]);
11 }
12
13 int
14 sys_renameat(struct tcb *tcp)
15 {
16         if (entering(tcp)) {
17                 decode_renameat(tcp);
18         }
19         return 0;
20 }
21
22 #include <linux/fs.h>
23 #include "xlat/rename_flags.h"
24
25 int
26 sys_renameat2(struct tcb *tcp)
27 {
28         if (entering(tcp)) {
29                 decode_renameat(tcp);
30                 tprints(", ");
31                 printflags(rename_flags, tcp->u_arg[4], "RENAME_??");
32         }
33         return 0;
34 }