]> granicus.if.org Git - strace/blobdiff - access.c
io.c: move sendfile parsers to a separate file
[strace] / access.c
index f28f69d78d290ef63a008692f9dec31dda7a766f..a9663dc1cfb6a8d2d41d594bd97839fc0f1938b6 100644 (file)
--- a/access.c
+++ b/access.c
@@ -7,24 +7,20 @@
 static int
 decode_access(struct tcb *tcp, int offset)
 {
-       if (entering(tcp)) {
-               printpath(tcp, tcp->u_arg[offset]);
-               tprints(", ");
-               printflags(access_flags, tcp->u_arg[offset + 1], "?_OK");
-       }
-       return 0;
+       printpath(tcp, tcp->u_arg[offset]);
+       tprints(", ");
+       printflags(access_flags, tcp->u_arg[offset + 1], "?_OK");
+
+       return RVAL_DECODED;
 }
 
-int
-sys_access(struct tcb *tcp)
+SYS_FUNC(access)
 {
        return decode_access(tcp, 0);
 }
 
-int
-sys_faccessat(struct tcb *tcp)
+SYS_FUNC(faccessat)
 {
-       if (entering(tcp))
-               print_dirfd(tcp, tcp->u_arg[0]);
+       print_dirfd(tcp, tcp->u_arg[0]);
        return decode_access(tcp, 1);
 }