projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0088392
)
libbpf: Return -ENODATA for missing btf section
author
Changbin Du
<changbin.du@gmail.com>
Sat, 31 Dec 2022 15:14:36 +0000
(23:14 +0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Tue, 3 Jan 2023 22:27:42 +0000
(14:27 -0800)
As discussed before, return -ENODATA (No data available) would be more
meaningful than ENOENT (No such file or directory).
Suggested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link:
https://lore.kernel.org/bpf/20221231151436.6541-1-changbin.du@gmail.com
tools/lib/bpf/btf.c
patch
|
blob
|
history
diff --git
a/tools/lib/bpf/btf.c
b/tools/lib/bpf/btf.c
index
b032500
..
6484111
100644
(file)
--- a/
tools/lib/bpf/btf.c
+++ b/
tools/lib/bpf/btf.c
@@
-1004,7
+1004,7
@@
static struct btf *btf_parse_elf(const char *path, struct btf *base_btf,
if (!btf_data) {
pr_warn("failed to find '%s' ELF section in %s\n", BTF_ELF_SEC, path);
- err = -ENO
ENT
;
+ err = -ENO
DATA
;
goto done;
}
btf = btf_new(btf_data->d_buf, btf_data->d_size, base_btf);