libbpf: fix map index used in error message
Subsystems (4)
PATCH 1/1 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]>
--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/libbpf.c +1 -1
@@ -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 ; }
Signature · 1 line
2.28.0
Quoted 4 lines · Toke Høiland-Jørgensen
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]>
Acked-by Yonghong Song <[email protected]>
Quoted 4 lines · Toke Høiland-Jørgensen
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]>
Applied, thanks!