Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

libbpf: Update the comment to remove the reference to the deprecated interface bpf_program__load().

Commit be2f2d1680df ("libbpf: Deprecate bpf_program__load() API") marked
bpf_program__load() as deprecated starting with libbpf v0.6. And later
in commit 146bf811f5ac ("libbpf: remove most other deprecated high-level
APIs") actually removed the bpf_program__load() implementation and
related old high-level APIs.

This patch update the comment in bpf_program__set_attach_target() to
remove the reference to the deprecated interface bpf_program__load().

Signed-off-by: Jianyun Gao <jianyungao89@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20251103120727.145965-1-jianyungao89@gmail.com

authored by

Jianyun Gao and committed by
Andrii Nakryiko
efa47566 74bd7bc0

+2 -2
+2 -2
tools/lib/bpf/libbpf.c
··· 13858 13858 return libbpf_err(-EINVAL); 13859 13859 13860 13860 if (attach_prog_fd && !attach_func_name) { 13861 - /* remember attach_prog_fd and let bpf_program__load() find 13862 - * BTF ID during the program load 13861 + /* Store attach_prog_fd. The BTF ID will be resolved later during 13862 + * the normal object/program load phase. 13863 13863 */ 13864 13864 prog->attach_prog_fd = attach_prog_fd; 13865 13865 return 0;