diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-10-05 00:40:36 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-10-06 03:09:48 +0200 |
commit | c9e4c3010c8c98aa867fce386ee459a32c00a487 (patch) | |
tree | 4b928e929366cb5a6503a4a23f98ea7cb859b5c6 /tools/lib | |
parent | libbpf: add bpf_object__open_{file, mem} w/ extensible opts (diff) | |
download | linux-c9e4c3010c8c98aa867fce386ee459a32c00a487.tar.xz linux-c9e4c3010c8c98aa867fce386ee459a32c00a487.zip |
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>
Diffstat (limited to 'tools/lib')
-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 d471d33400ae..a02cdedc4e3f 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -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) |