diff options
| author | Daniel Xu <[email protected]> | 2023-08-23 23:15:02 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2023-08-24 00:10:09 +0000 |
| commit | 068ca522d5a563ac4ecc48c2c7c390102537fefd (patch) | |
| tree | 56a3b672689927cd5112501cbe208a6ddd484143 /tools/lib/bpf/libbpf.h | |
| parent | Merge branch 'bpf-fix-an-issue-in-verifing-allow_ptr_leaks' (diff) | |
| download | kernel-068ca522d5a563ac4ecc48c2c7c390102537fefd.tar.gz kernel-068ca522d5a563ac4ecc48c2c7c390102537fefd.zip | |
libbpf: Add bpf_object__unpin()
For bpf_object__pin_programs() there is bpf_object__unpin_programs().
Likewise bpf_object__unpin_maps() for bpf_object__pin_maps().
But no bpf_object__unpin() for bpf_object__pin(). Adding the former adds
symmetry to the API.
It's also convenient for cleanup in application code. It's an API I
would've used if it was available for a repro I was writing earlier.
Signed-off-by: Daniel Xu <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Reviewed-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/bpf/b2f9d41da4a350281a0b53a804d11b68327e14e5.1692832478.git.dxu@dxuuu.xyz
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
| -rw-r--r-- | tools/lib/bpf/libbpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h index 2e3eb3614c40..0e52621cba43 100644 --- a/tools/lib/bpf/libbpf.h +++ b/tools/lib/bpf/libbpf.h @@ -266,6 +266,7 @@ LIBBPF_API int bpf_object__pin_programs(struct bpf_object *obj, LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj, const char *path); LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path); +LIBBPF_API int bpf_object__unpin(struct bpf_object *object, const char *path); LIBBPF_API const char *bpf_object__name(const struct bpf_object *obj); LIBBPF_API unsigned int bpf_object__kversion(const struct bpf_object *obj); |
