summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2019-08-15 17:32:18 +0300
committerAlexei Starovoitov <ast@kernel.org>2019-08-16 08:06:46 +0300
commit8a15d5ced8c626c0331974c7281c1d651f7b0d83 (patch)
treea0ebea1dd41671c24896cc05f2ca9009fc008f9a /tools/bpf
parented4a3983cd3eb93aaf80de8d8a36efed808acff2 (diff)
downloadlinux-8a15d5ced8c626c0331974c7281c1d651f7b0d83.tar.xz
tools: bpftool: fix format string for p_err() in query_flow_dissector()
The format string passed to one call to the p_err() function in query_flow_dissector() does not match the value that should be printed, resulting in some garbage integer being printed instead of strerror(errno) if /proc/self/ns/net cannot be open. Let's fix the format string. Fixes: 7f0c57fec80f ("bpftool: show flow_dissector attachment status") Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/net.c b/tools/bpf/bpftool/net.c
index a213a9b7f69c..4f52d3151616 100644
--- a/tools/bpf/bpftool/net.c
+++ b/tools/bpf/bpftool/net.c
@@ -226,7 +226,7 @@ static int query_flow_dissector(struct bpf_attach_info *attach_info)
fd = open("/proc/self/ns/net", O_RDONLY);
if (fd < 0) {
- p_err("can't open /proc/self/ns/net: %d",
+ p_err("can't open /proc/self/ns/net: %s",
strerror(errno));
return -1;
}