summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorJames Morris <james.morris@microsoft.com>2018-03-22 22:26:16 +0100
committerJames Morris <james.morris@microsoft.com>2018-03-22 22:26:16 +0100
commit5893ed18a26d1f56b97c0290b0cbbc2d49d6de28 (patch)
tree97aa931519fca28a0a12fad7485347198f8267cc /tools/bpf
parentexec: Set file unwritable before LSM check (diff)
parentLinux 4.16-rc6 (diff)
downloadlinux-5893ed18a26d1f56b97c0290b0cbbc2d49d6de28.tar.xz
linux-5893ed18a26d1f56b97c0290b0cbbc2d49d6de28.zip
Merge tag 'v4.16-rc6' into next-general
Merge to Linux 4.16-rc6 at the request of Jarkko, for his TPM updates.
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/main.c2
-rw-r--r--tools/bpf/bpftool/prog.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c
index 3a0396d87c42..185acfa229b5 100644
--- a/tools/bpf/bpftool/main.c
+++ b/tools/bpf/bpftool/main.c
@@ -244,7 +244,7 @@ static int do_batch(int argc, char **argv)
}
if (errno && errno != ENOENT) {
- perror("reading batch file failed");
+ p_err("reading batch file failed: %s", strerror(errno));
err = -1;
} else {
p_info("processed %d lines", lines);
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index e8e2baaf93c2..e549e329be82 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -774,6 +774,9 @@ static int do_dump(int argc, char **argv)
n < 0 ? strerror(errno) : "short write");
goto err_free;
}
+
+ if (json_output)
+ jsonw_null(json_wtr);
} else {
if (member_len == &info.jited_prog_len) {
const char *name = NULL;