Commit c9e4c301 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov
Browse files

libbpf: fix bpf_object__name() to actually return object name



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

Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 2ce8450e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)