Commit 06ee9da6 authored by Quentin Monnet's avatar Quentin Monnet Committed by Daniel Borkmann

tools: bpftool: print nb of cmds to stdout (not stderr) for batch mode

When batch mode is used and all commands succeeds, bpftool prints the
number of commands processed to stderr. There is no particular reason to
use stderr for this, we could as well use stdout. It would avoid getting
unnecessary output on stderr if the standard ouptut is redirected, for
example.
Reported-by: default avatarDavid Beckett <david.beckett@netronome.com>
Signed-off-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 882731e0
...@@ -321,7 +321,8 @@ static int do_batch(int argc, char **argv) ...@@ -321,7 +321,8 @@ static int do_batch(int argc, char **argv)
p_err("reading batch file failed: %s", strerror(errno)); p_err("reading batch file failed: %s", strerror(errno));
err = -1; err = -1;
} else { } else {
p_info("processed %d commands", lines); if (!json_output)
printf("processed %d commands\n", lines);
err = 0; err = 0;
} }
err_close: err_close:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment