]> granicus.if.org Git - strace/blob - renameat.c
bfin, csky, m68k, sh: fix build regression
[strace] / renameat.c
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
8 #include "defs.h"
9
10 static void
11 decode_renameat(struct tcb *tcp)
12 {
13         print_dirfd(tcp, tcp->u_arg[0]);
14         tprints(", ");
15         printpath(tcp, tcp->u_arg[1]);
16         tprints(", ");
17         print_dirfd(tcp, tcp->u_arg[2]);
18         tprints(", ");
19         printpath(tcp, tcp->u_arg[3]);
20 }
21
22 SYS_FUNC(renameat)
23 {
24         decode_renameat(tcp);
25
26         return RVAL_DECODED;
27 }
28
29 #include <linux/fs.h>
30 #include "xlat/rename_flags.h"
31
32 SYS_FUNC(renameat2)
33 {
34         decode_renameat(tcp);
35         tprints(", ");
36         printflags(rename_flags, tcp->u_arg[4], "RENAME_??");
37
38         return RVAL_DECODED;
39 }