libbpf: Expose btf_type_by_id() internally
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 18 Mar 2021 19:40:25 +0000 (12:40 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 18 Mar 2021 23:14:22 +0000 (16:14 -0700)
commite14ef4bf011192b61b48c4f3a35b3041140073ff
tree8e26124925f2716effc573223f31042ab528876f
parentfdc13979f91e664717f47eb8c49094e4b7f202e3
libbpf: Expose btf_type_by_id() internally

btf_type_by_id() is internal-only convenience API returning non-const pointer
to struct btf_type. Expose it outside of btf.c for re-use.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210318194036.3521577-2-andrii@kernel.org
tools/lib/bpf/btf.c
tools/lib/bpf/libbpf_internal.h