]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tools: bpftool: use err() instead of info() if there are too many insns
authorQuentin Monnet <quentin.monnet@netronome.com>
Thu, 19 Oct 2017 22:46:21 +0000 (15:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Oct 2017 01:11:32 +0000 (02:11 +0100)
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 <quentin.monnet@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/bpf/bpftool/prog.c

index ede7957adcd9ba22198f0e78b83c2a2c35e3a63b..6c03d2ea3f79455f5d186729398ae2a93b5506cc 100644 (file)
@@ -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;
        }