Commit fd17e272 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

tools/bpftool: Replace bpf_program__title() with bpf_program__section_name()

bpf_program__title() is deprecated, switch to bpf_program__section_name() and
avoid compilation warnings.
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200903203542.15944-9-andriin@fb.com
parent a08c02f8
...@@ -1304,7 +1304,7 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) ...@@ -1304,7 +1304,7 @@ static int load_with_options(int argc, char **argv, bool first_prog_only)
enum bpf_prog_type prog_type = common_prog_type; enum bpf_prog_type prog_type = common_prog_type;
if (prog_type == BPF_PROG_TYPE_UNSPEC) { if (prog_type == BPF_PROG_TYPE_UNSPEC) {
const char *sec_name = bpf_program__title(pos, false); const char *sec_name = bpf_program__section_name(pos);
err = get_prog_type_by_name(sec_name, &prog_type, err = get_prog_type_by_name(sec_name, &prog_type,
&expected_attach_type); &expected_attach_type);
...@@ -1398,7 +1398,7 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) ...@@ -1398,7 +1398,7 @@ static int load_with_options(int argc, char **argv, bool first_prog_only)
err = bpf_obj_pin(bpf_program__fd(prog), pinfile); err = bpf_obj_pin(bpf_program__fd(prog), pinfile);
if (err) { if (err) {
p_err("failed to pin program %s", p_err("failed to pin program %s",
bpf_program__title(prog, false)); bpf_program__section_name(prog));
goto err_close_obj; goto err_close_obj;
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment