diff options
author | Hengqi Chen <hengqi.chen@gmail.com> | 2021-10-22 21:06:19 +0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-10-22 16:09:14 -0700 |
commit | 6a886de070fad850d6cb74a787c9ed017303d9ac (patch) | |
tree | e5b377bb2d5b606d9ef4de32fbb993cfb755f2a0 /tools/lib/bpf/libbpf.map | |
parent | 1000298c76830bc291358e98e8fa5baa3baa9b3a (diff) | |
download | lwn-6a886de070fad850d6cb74a787c9ed017303d9ac.tar.gz lwn-6a886de070fad850d6cb74a787c9ed017303d9ac.zip |
libbpf: Add btf__type_cnt() and btf__raw_data() APIs
Add btf__type_cnt() and btf__raw_data() APIs and deprecate
btf__get_nr_type() and btf__get_raw_data() since the old APIs
don't follow the libbpf naming convention for getters which
omit 'get' in the name (see [0]). btf__raw_data() is just an
alias to the existing btf__get_raw_data(). btf__type_cnt()
now returns the number of all types of the BTF object
including 'void'.
[0] Closes: https://github.com/libbpf/libbpf/issues/279
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211022130623.1548429-2-hengqi.chen@gmail.com
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r-- | tools/lib/bpf/libbpf.map | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index e6fb1ba49369..116964a29e44 100644 --- a/tools/lib/bpf/libbpf.map +++ b/tools/lib/bpf/libbpf.map @@ -395,4 +395,6 @@ LIBBPF_0.6.0 { bpf_object__prev_program; btf__add_btf; btf__add_decl_tag; + btf__raw_data; + btf__type_cnt; } LIBBPF_0.5.0; |