bpf: libbpf: don't specify prog name if kernel doesn't support it
authorStanislav Fomichev <sdf@google.com>
Wed, 21 Nov 2018 01:11:21 +0000 (17:11 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Nov 2018 22:26:14 +0000 (23:26 +0100)
commit5b32a23e1d879b78ee72144311314eccf7581bf4
tree495e4f551a51d726483bb5aa77ff7ed621faf574
parent94cb310cfaa16582cd49ebbeea5925e8f49324a1
bpf: libbpf: don't specify prog name if kernel doesn't support it

Use recently added capability check.

See commit 23499442c319 ("bpf: libbpf: retry map creation without
the name") for rationale.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c