diff options
author | 2021-07-23 15:15:11 -0700 | |
---|---|---|
committer | 2021-07-23 16:57:03 -0700 | |
commit | e244d34d0ea1aebf60e83ee6d1701a81448f31c1 (patch) | |
tree | 375629c2a1def9dca3b26ed13566e6b4bfca8a01 /tools/lib/bpf/libbpf.c | |
parent | Merge branch 'bpf: Allow bpf tcp iter to do bpf_(get|set)sockopt' (diff) | |
download | wireguard-linux-e244d34d0ea1aebf60e83ee6d1701a81448f31c1.tar.xz wireguard-linux-e244d34d0ea1aebf60e83ee6d1701a81448f31c1.zip |
libbpf: Add bpf_map__pin_path function
Add bpf_map__pin_path, so that the inconsistently named
bpf_map__get_pin_path can be deprecated later. This is part of the
effort towards libbpf v1.0: https://github.com/libbpf/libbpf/issues/307
Also, add a selftest for the new function.
Signed-off-by: Evgeniy Litvinenko <evgeniyl@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210723221511.803683-1-evgeniyl@fb.com
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
-rw-r--r-- | tools/lib/bpf/libbpf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index e595816b8b76..a53ca29b44ab 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -8511,6 +8511,11 @@ const char *bpf_map__get_pin_path(const struct bpf_map *map) return map->pin_path; } +const char *bpf_map__pin_path(const struct bpf_map *map) +{ + return map->pin_path; +} + bool bpf_map__is_pinned(const struct bpf_map *map) { return map->pinned; |