diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/bpf/bpftool/main.c | 2 | ||||
| -rw-r--r-- | tools/bpf/bpftool/prog.c | 3 |
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) | |||
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | if (errno && errno != ENOENT) { | 246 | if (errno && errno != ENOENT) { |
| 247 | perror("reading batch file failed"); | 247 | p_err("reading batch file failed: %s", strerror(errno)); |
| 248 | err = -1; | 248 | err = -1; |
| 249 | } else { | 249 | } else { |
| 250 | p_info("processed %d lines", lines); | 250 | 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) | |||
| 774 | n < 0 ? strerror(errno) : "short write"); | 774 | n < 0 ? strerror(errno) : "short write"); |
| 775 | goto err_free; | 775 | goto err_free; |
| 776 | } | 776 | } |
| 777 | |||
| 778 | if (json_output) | ||
| 779 | jsonw_null(json_wtr); | ||
| 777 | } else { | 780 | } else { |
| 778 | if (member_len == &info.jited_prog_len) { | 781 | if (member_len == &info.jited_prog_len) { |
| 779 | const char *name = NULL; | 782 | const char *name = NULL; |
