]> granicus.if.org Git - strace/blobdiff - seccomp.c
Remove HAVE_STRUCT_TCB_EXT_ARG, ext_arg, and u_lrval
[strace] / seccomp.c
index 5d972f97f858d4f22ab4c8b4c76051ddeda38ce8..f778a6c4eaade4bf0339f52d0787141357164bae 100644 (file)
--- a/seccomp.c
+++ b/seccomp.c
@@ -171,11 +171,10 @@ print_bpf_filter(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
        return true;
 }
 
-static void
-print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len)
+void
+print_seccomp_fprog(struct tcb *const tcp, const kernel_ulong_t addr,
+                   const unsigned short len)
 {
-       tprintf("{len=%u, filter=", len);
-
        if (abbrev(tcp)) {
                printaddr(addr);
        } else {
@@ -185,23 +184,25 @@ print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len)
                print_array(tcp, addr, len, &filter, sizeof(filter),
                            umoven_or_printaddr, print_bpf_filter, &insns);
        }
-
-       tprints("}");
 }
 
 #include "seccomp_fprog.h"
 
 void
-print_seccomp_filter(struct tcb *tcp, unsigned long addr)
+print_seccomp_filter(struct tcb *const tcp, const kernel_ulong_t addr)
 {
        struct seccomp_fprog fprog;
 
-       if (fetch_seccomp_fprog(tcp, addr, &fprog))
+       if (fetch_seccomp_fprog(tcp, addr, &fprog)) {
+               tprintf("{len=%hu, filter=", fprog.len);
                print_seccomp_fprog(tcp, fprog.filter, fprog.len);
+               tprints("}");
+       }
 }
 
 static void
-decode_seccomp_set_mode_strict(unsigned int flags, unsigned long addr)
+decode_seccomp_set_mode_strict(const unsigned int flags,
+                              const kernel_ulong_t addr)
 {
        tprintf("%u, ", flags);
        printaddr(addr);