OSDN Git Service

tools: bpftool: add pointer to file argument to print_hex()
authorQuentin Monnet <quentin.monnet@netronome.com>
Thu, 19 Oct 2017 22:46:19 +0000 (15:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Oct 2017 01:11:31 +0000 (02:11 +0100)
commit9cbe1f581d17baff7e93936feb041c90b29eb6a8
tree340bf4f384d93493c7e618f600a0706221a17db9
parentf3ae608edb3be2e9a3f668d47aced3553eaf6c14
tools: bpftool: add pointer to file argument to print_hex()

Make print_hex() able to print to any file instead of standard output
only, and rename it to fprint_hex(). The function can now be called with
the info() macro, for example, without splitting the output between
standard and error outputs.

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/main.c
tools/bpf/bpftool/main.h
tools/bpf/bpftool/map.c
tools/bpf/bpftool/prog.c