diff options
Diffstat (limited to 'tools/bpf/bpftool/main.c')
-rw-r--r-- | tools/bpf/bpftool/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c index c53c553adcac..08d0ac543c67 100644 --- a/tools/bpf/bpftool/main.c +++ b/tools/bpf/bpftool/main.c @@ -510,10 +510,9 @@ int main(int argc, char **argv) break; case 'B': base_btf = btf__parse(optarg, NULL); - if (libbpf_get_error(base_btf)) { - p_err("failed to parse base BTF at '%s': %ld\n", - optarg, libbpf_get_error(base_btf)); - base_btf = NULL; + if (!base_btf) { + p_err("failed to parse base BTF at '%s': %d\n", + optarg, -errno); return -1; } break; |