Home | History | Annotate | Download | only in strace
      1 #include "defs.h"
      2 
      3 #include <fcntl.h>
      4 
      5 #include "xlat/access_flags.h"
      6 
      7 static int
      8 decode_access(struct tcb *tcp, int offset)
      9 {
     10 	printpath(tcp, tcp->u_arg[offset]);
     11 	tprints(", ");
     12 	printflags(access_flags, tcp->u_arg[offset + 1], "?_OK");
     13 
     14 	return RVAL_DECODED;
     15 }
     16 
     17 SYS_FUNC(access)
     18 {
     19 	return decode_access(tcp, 0);
     20 }
     21 
     22 SYS_FUNC(faccessat)
     23 {
     24 	print_dirfd(tcp, tcp->u_arg[0]);
     25 	return decode_access(tcp, 1);
     26 }
     27