diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-09-03 13:35:36 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-03 17:14:40 -0700 |
commit | fd17e272be9c50190f1185a1007d72dc1eedb903 (patch) | |
tree | b846f50ee5013290b2600391fe6726d6ad6c035f /tools/bpf | |
parent | a08c02f8d4ae50527b9f26a7147686ed55c93782 (diff) | |
download | linux-stable-fd17e272be9c50190f1185a1007d72dc1eedb903.tar.gz linux-stable-fd17e272be9c50190f1185a1007d72dc1eedb903.tar.bz2 linux-stable-fd17e272be9c50190f1185a1007d72dc1eedb903.zip |
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: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200903203542.15944-9-andriin@fb.com
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/prog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index d393eb8263a6..f7923414a052 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -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; 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, &expected_attach_type); @@ -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); if (err) { p_err("failed to pin program %s", - bpf_program__title(prog, false)); + bpf_program__section_name(prog)); goto err_close_obj; } } else { |