bpf: libbpf: Fix bpf_program__next() API
authorMartin KaFai Lau <kafai@fb.com>
Mon, 12 Nov 2018 23:44:53 +0000 (15:44 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 17 Nov 2018 01:46:54 +0000 (17:46 -0800)
commita83d6e76a67424ebbbbed643f51e97934ffc2bc2
treec9905473ea6cece22d0201c4971b044c575937da
parent5c86d2125b58949122e03f04ce940e6f5b8534ba
bpf: libbpf: Fix bpf_program__next() API

This patch restores the behavior in
commit eac7d84519a3 ("tools: libbpf: don't return '.text' as a program for multi-function programs")
such that bpf_program__next() does not return pseudo programs in ".text".

Fixes: 0c19a9fbc9cd ("libbpf: cleanup after partial failure in bpf_object__pin")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c