diff options
| author | Toke Høiland-Jørgensen <[email protected]> | 2020-08-19 11:05:34 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-08-20 14:21:27 +0000 |
| commit | 1e891e513e16c145cc9b45b1fdb8bf4a4f2f9557 (patch) | |
| tree | b085115994c30914ea631640962d3a41a508e59a /tools/lib/bpf/libbpf.c | |
| parent | bpftool: Handle EAGAIN error code properly in pids collection (diff) | |
| download | kernel-1e891e513e16c145cc9b45b1fdb8bf4a4f2f9557.tar.gz kernel-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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
| -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; } |
