diff options
author | Toke Høiland-Jørgensen <toke@redhat.com> | 2020-08-19 13:05:34 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-08-20 16:21:27 +0200 |
commit | 1e891e513e16c145cc9b45b1fdb8bf4a4f2f9557 (patch) | |
tree | b085115994c30914ea631640962d3a41a508e59a | |
parent | bpftool: Handle EAGAIN error code properly in pids collection (diff) | |
download | linux-1e891e513e16c145cc9b45b1fdb8bf4a4f2f9557.tar.xz linux-1e891e513e16c145cc9b45b1fdb8bf4a4f2f9557.zip |
libbpf: Fix map index used in error message
The error message emitted by bpf_object__init_user_btf_maps() was using the
wrong section ID.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200819110534.9058-1-toke@redhat.com
-rw-r--r-- | tools/lib/bpf/libbpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 5d20b2da4427..0ad0b0491e1f 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -2264,7 +2264,7 @@ static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict, data = elf_getdata(scn, NULL); if (!scn || !data) { pr_warn("failed to get Elf_Data from map section %d (%s)\n", - obj->efile.maps_shndx, MAPS_ELF_SEC); + obj->efile.btf_maps_shndx, MAPS_ELF_SEC); return -EINVAL; } |