* [PATCH] libbpf: Return -ENODATA for missing btf section
@ 2022-12-31 15:14 Changbin Du
2023-01-03 22:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Changbin Du @ 2022-12-31 15:14 UTC (permalink / raw)
To: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann
Cc: Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, bpf,
linux-kernel, Changbin Du, Leo Yan, Andrii Nakryiko
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>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: Changbin Du <changbin.du@gmail.com>
---
tools/lib/bpf/btf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index dd2badf1a54e..2c89454c0136 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -991,7 +991,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 = -ENOENT;
+ err = -ENODATA;
goto done;
}
btf = btf_new(btf_data->d_buf, btf_data->d_size, base_btf);
--
2.37.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libbpf: Return -ENODATA for missing btf section
2022-12-31 15:14 [PATCH] libbpf: Return -ENODATA for missing btf section Changbin Du
@ 2023-01-03 22:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-03 22:30 UTC (permalink / raw)
To: Changbin Du
Cc: andrii, ast, daniel, martin.lau, song, yhs, john.fastabend,
kpsingh, sdf, haoluo, jolsa, bpf, linux-kernel, leo.yan,
andrii.nakryiko
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Sat, 31 Dec 2022 23:14:36 +0800 you wrote:
> 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>
> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
>
> [...]
Here is the summary with links:
- libbpf: Return -ENODATA for missing btf section
https://git.kernel.org/bpf/bpf-next/c/acd3b7768048
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-03 22:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-31 15:14 [PATCH] libbpf: Return -ENODATA for missing btf section Changbin Du
2023-01-03 22:30 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.