tools: bpftool: use err() instead of info() if there are too many insns
authorQuentin Monnet <[email protected]>
Thu, 19 Oct 2017 22:46:21 +0000 (15:46 -0700)
committerDavid S. Miller <[email protected]>
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 <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
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;
        }