diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-11-10 21:36:22 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-11-11 16:54:06 -0800 |
commit | 60ba87bb6bafaaa6e8ef9a73834cf701194d1923 (patch) | |
tree | 454b4cfd901f2501a4a9723933044a1817854e14 /tools/testing/selftests/bpf/btf_helpers.c | |
parent | 0b52a5f4b994c05070237271c7fac3265b640ffb (diff) | |
download | linux-60ba87bb6bafaaa6e8ef9a73834cf701194d1923.tar.gz linux-60ba87bb6bafaaa6e8ef9a73834cf701194d1923.tar.bz2 linux-60ba87bb6bafaaa6e8ef9a73834cf701194d1923.zip |
selftests/bpf: Update btf_dump__new() uses to v1.0+ variant
Update to-be-deprecated forms of btf_dump__new().
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211111053624.190580-8-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/btf_helpers.c')
-rw-r--r-- | tools/testing/selftests/bpf/btf_helpers.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/btf_helpers.c b/tools/testing/selftests/bpf/btf_helpers.c index 3d1a748d09d8..acb59202486d 100644 --- a/tools/testing/selftests/bpf/btf_helpers.c +++ b/tools/testing/selftests/bpf/btf_helpers.c @@ -238,7 +238,6 @@ const char *btf_type_c_dump(const struct btf *btf) static char buf[16 * 1024]; FILE *buf_file; struct btf_dump *d = NULL; - struct btf_dump_opts opts = {}; int err, i; buf_file = fmemopen(buf, sizeof(buf) - 1, "w"); @@ -247,8 +246,7 @@ const char *btf_type_c_dump(const struct btf *btf) return NULL; } - opts.ctx = buf_file; - d = btf_dump__new(btf, NULL, &opts, btf_dump_printf); + d = btf_dump__new(btf, btf_dump_printf, buf_file, NULL); if (libbpf_get_error(d)) { fprintf(stderr, "Failed to create btf_dump instance: %ld\n", libbpf_get_error(d)); goto err_out; |