1 /*
2 * Copyright (c) 2014-2021 The strace developers.
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7
8 #include "defs.h"
9
10 static void
11 decode_renameat(struct tcb *tcp)
12 {
13 /* olddirfd */
14 print_dirfd(tcp, tcp->u_arg[0]);
15 tprint_arg_next();
16
17 /* oldpath */
18 printpath(tcp, tcp->u_arg[1]);
19 tprint_arg_next();
20
21 /* newdirfd */
22 print_dirfd(tcp, tcp->u_arg[2]);
23 tprint_arg_next();
24
25 /* newpath */
26 printpath(tcp, tcp->u_arg[3]);
27 }
28
29 SYS_FUNC(renameat)
30 {
31 decode_renameat(tcp);
32
33 return RVAL_DECODED;
34 }
35
36 #include <linux/fs.h>
37 #include "xlat/rename_flags.h"
38
39 SYS_FUNC(renameat2)
40 {
41 decode_renameat(tcp);
42 tprint_arg_next();
43
44 /* flags */
45 printflags(rename_flags, tcp->u_arg[4], "RENAME_??");
46
47 return RVAL_DECODED;
48 }