From: Quentin Monnet Date: Thu, 19 Oct 2017 22:46:21 +0000 (-0700) Subject: tools: bpftool: use err() instead of info() if there are too many insns X-Git-Tag: Ubuntu-5.10.0-12.13~8999^2~369^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1d84487e2a2b98892c3dec7934604e9b76577aa6;p=mirror_ubuntu-hirsute-kernel.git tools: bpftool: use err() instead of info() if there are too many insns Make error messages and return codes more consistent. Specifically, replace the use of info() macro with err() when too many eBPF instructions are received to be dumped, given that bpftool returns with a non-null exit value in that case. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller --- diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index ede7957adcd9..6c03d2ea3f79 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -416,7 +416,7 @@ static int do_dump(int argc, char **argv) } if (*member_len > buf_size) { - info("too many instructions returned\n"); + err("too many instructions returned\n"); goto err_free; }