diff options
| author | Jakub Kicinski <[email protected]> | 2018-01-02 22:48:37 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2018-01-04 11:28:46 +0000 |
| commit | b4fac96d9a672def4e24c1858adb7e9351471815 (patch) | |
| tree | 7ad59b3c1ad348e95e1daab86b444eb0968bbff6 /tools/bpf/bpftool/prog.c | |
| parent | tools: bpftool: alias show and list commands (diff) | |
| download | kernel-b4fac96d9a672def4e24c1858adb7e9351471815.tar.gz kernel-b4fac96d9a672def4e24c1858adb7e9351471815.zip | |
tools: bpftool: remove new lines from errors
It's a little bit unusual for kernel style, but we add the new line
character to error strings inside the p_err() function. We do this
because new lines at the end of error strings will break JSON output.
Fix a few p_err("..\n") which snuck in recently.
Fixes: 5ccda64d38cc ("bpftool: implement cgroup bpf operations")
Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Quentin Monnet <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
| -rw-r--r-- | tools/bpf/bpftool/prog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 5577960bffe4..c6a28be4665c 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -813,12 +813,12 @@ static int do_load(int argc, char **argv) usage(); if (bpf_prog_load(argv[0], BPF_PROG_TYPE_UNSPEC, &obj, &prog_fd)) { - p_err("failed to load program\n"); + p_err("failed to load program"); return -1; } if (do_pin_fd(prog_fd, argv[1])) { - p_err("failed to pin program\n"); + p_err("failed to pin program"); return -1; } |
