mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:10:51 +07:00
tools: bpftool: add error message on pin failure
No error message is currently printed if the pin syscall
itself fails. It got lost in the loadall refactoring.
Fixes: 77380998d9
("bpftool: add loadall command")
Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
b3e78adcbf
commit
3c7be384fe
@ -204,7 +204,11 @@ int do_pin_fd(int fd, const char *name)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return bpf_obj_pin(fd, name);
|
||||
err = bpf_obj_pin(fd, name);
|
||||
if (err)
|
||||
p_err("can't pin the object (%s): %s", name, strerror(errno));
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(__u32))
|
||||
|
Loading…
Reference in New Issue
Block a user