diff options
author | Hengqi Chen <hengqi.chen@gmail.com> | 2021-10-03 18:58:44 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-10-06 21:34:02 +0200 |
commit | 6f2b219b62a4376ca2da15c503de79d0650c8155 (patch) | |
tree | d6b57e0ba51373477c58bea70ec99e43e553913e /tools/bpf | |
parent | libbpf: Deprecate bpf_{map,program}__{prev,next} APIs since v0.7 (diff) | |
download | linux-6f2b219b62a4376ca2da15c503de79d0650c8155.tar.xz linux-6f2b219b62a4376ca2da15c503de79d0650c8155.zip |
selftests/bpf: Switch to new bpf_object__next_{map,program} APIs
Replace deprecated bpf_{map,program}__next APIs with newly added
bpf_object__next_{map,program} APIs, so that no compilation warnings
emit.
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211003165844.4054931-3-hengqi.chen@gmail.com
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/iter.c | 2 | ||||
-rw-r--r-- | tools/bpf/bpftool/prog.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/iter.c b/tools/bpf/bpftool/iter.c index 84a9b01d956d..6c0de647b8ad 100644 --- a/tools/bpf/bpftool/iter.c +++ b/tools/bpf/bpftool/iter.c @@ -57,7 +57,7 @@ static int do_pin(int argc, char **argv) goto close_obj; } - prog = bpf_program__next(NULL, obj); + prog = bpf_object__next_program(obj, NULL); if (!prog) { p_err("can't find bpf program in objfile %s", objfile); goto close_obj; diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 9c3e343b7d87..a24ea7e26aa4 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -1601,7 +1601,7 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) goto err_close_obj; if (first_prog_only) { - prog = bpf_program__next(NULL, obj); + prog = bpf_object__next_program(obj, NULL); if (!prog) { p_err("object file doesn't contain any bpf program"); goto err_close_obj; |