util-ebpf: more useful error message

At the time of the writing, libbpf output useful error message
on strdout only and errno is not really interesting. So let's
tell user to look at stdout.
pull/3952/head
Eric Leblond 6 years ago committed by Victor Julien
parent 833d9ef7e1
commit af6daceeda

@ -387,11 +387,9 @@ int EBPFLoadFile(const char *iface, const char *path, const char * section,
err = bpf_object__load(bpfobj);
if (err < 0) {
if (err == -EPERM) {
SCLogError(SC_ERR_MEM_ALLOC,
"Permission issue when loading eBPF object: "
"%s (%d)",
strerror(err),
err);
SCLogError(SC_ERR_SYSCALL,
"Permission issue when loading eBPF object"
" (check libbpf error on stdout)");
} else {
char buf[129];
libbpf_strerror(err, buf, sizeof(buf));

Loading…
Cancel
Save