mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
libbpf: make uniform use of btf__fd() accessor inside libbpf
It makes future grepping and code analysis a bit easier. Acked-by: Jiri Olsa <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
committed by
Alexei Starovoitov
parent
f8506c5734
commit
df7c3f7d3a
@@ -7050,7 +7050,7 @@ static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog
|
||||
load_attr.prog_ifindex = prog->prog_ifindex;
|
||||
|
||||
/* specify func_info/line_info only if kernel supports them */
|
||||
btf_fd = bpf_object__btf_fd(obj);
|
||||
btf_fd = btf__fd(obj->btf);
|
||||
if (btf_fd >= 0 && kernel_supports(obj, FEAT_BTF_FUNC)) {
|
||||
load_attr.prog_btf_fd = btf_fd;
|
||||
load_attr.func_info = prog->func_info;
|
||||
|
||||
Reference in New Issue
Block a user