blob: 83741c9e2abe9336a449b6d8c6027d8fba5a7e28 [file] [log] [blame]
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +00001#include "defs.h"
2
Dmitry V. Levina4d45722015-07-20 17:30:38 +00003static void
4decode_chmod(struct tcb *tcp, const int offset)
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +00005{
Dmitry V. Levina4d45722015-07-20 17:30:38 +00006 printpath(tcp, tcp->u_arg[offset]);
7 tprintf(", %#lo", tcp->u_arg[offset + 1]);
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +00008}
9
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000010SYS_FUNC(chmod)
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000011{
Dmitry V. Levina4d45722015-07-20 17:30:38 +000012 decode_chmod(tcp, 0);
13
14 return RVAL_DECODED;
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000015}
16
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000017SYS_FUNC(fchmodat)
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000018{
Dmitry V. Levina4d45722015-07-20 17:30:38 +000019 print_dirfd(tcp, tcp->u_arg[0]);
20 decode_chmod(tcp, 1);
21
22 return RVAL_DECODED;
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000023}
24
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000025SYS_FUNC(fchmod)
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000026{
Dmitry V. Levina4d45722015-07-20 17:30:38 +000027 printfd(tcp, tcp->u_arg[0]);
28 tprintf(", %#lo", tcp->u_arg[1]);
29
30 return RVAL_DECODED;
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000031}