diff options
Diffstat (limited to 'src/renameat.c')
-rw-r--r-- | src/renameat.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/renameat.c b/src/renameat.c new file mode 100644 index 000000000..584ea0206 --- /dev/null +++ b/src/renameat.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2014-2019 The strace developers. + * All rights reserved. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#include "defs.h" + +static void +decode_renameat(struct tcb *tcp) +{ + print_dirfd(tcp, tcp->u_arg[0]); + tprints(", "); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + print_dirfd(tcp, tcp->u_arg[2]); + tprints(", "); + printpath(tcp, tcp->u_arg[3]); +} + +SYS_FUNC(renameat) +{ + decode_renameat(tcp); + + return RVAL_DECODED; +} + +#include <linux/fs.h> +#include "xlat/rename_flags.h" + +SYS_FUNC(renameat2) +{ + decode_renameat(tcp); + tprints(", "); + printflags(rename_flags, tcp->u_arg[4], "RENAME_??"); + + return RVAL_DECODED; +} |