libbpf-tools: update biopattern for libbpf 1.0
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 17 Dec 2021 22:18:48 +0000 (14:18 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 20 Dec 2021 21:21:26 +0000 (13:21 -0800)
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
libbpf-tools/biopattern.c

index e5bebaa25c622168a413bc66e490153749f28ad8..e963b326344d9b347381d51a010eeed75fc0abe2 100644 (file)
@@ -173,14 +173,9 @@ int main(int argc, char **argv)
        if (err)
                return err;
 
+       libbpf_set_strict_mode(LIBBPF_STRICT_ALL);
        libbpf_set_print(libbpf_print_fn);
 
-       err = bump_memlock_rlimit();
-       if (err) {
-               fprintf(stderr, "failed to increase rlimit: %d\n", err);
-               return 1;
-       }
-
        obj = biopattern_bpf__open();
        if (!obj) {
                fprintf(stderr, "failed to open BPF object\n");