libbpf: fix bpf_object__name() to actually return object name

bpf_object__name() was returning file path, not name. Fix this.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Andrii Nakryiko 2019-10-04 15:40:36 -07:00 committed by Alexei Starovoitov
parent 2ce8450ef5
commit c9e4c3010c
1 changed files with 1 additions and 1 deletions

View File

@ -4231,7 +4231,7 @@ bpf_object__next(struct bpf_object *prev)
const char *bpf_object__name(const struct bpf_object *obj)
{
return obj ? obj->path : ERR_PTR(-EINVAL);
return obj ? obj->name : ERR_PTR(-EINVAL);
}
unsigned int bpf_object__kversion(const struct bpf_object *obj)