libbpf: Constify all high-level program attach APIs
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 16 Sep 2021 01:58:36 +0000 (18:58 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 17 Sep 2021 16:05:41 +0000 (09:05 -0700)
commit942025c9f37ee45e69eb5f39a2877afab66d9555
tree41c2d3963751330b621ff21f8e1014f3d058ba88
parent91b555d73e53879fc6d4cf82c8c0e14c00ce212d
libbpf: Constify all high-level program attach APIs

Attach APIs shouldn't need to modify bpf_program/bpf_map structs, so
change all struct bpf_program and struct bpf_map pointers to const
pointers. This is completely backwards compatible with no functional
change.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210916015836.1248906-8-andrii@kernel.org
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h