mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-27 11:49:07 +08:00
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
This commit is contained in:
committed by
Andrii Nakryiko
parent
14f5433b2e
commit
e44c8486c6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user