summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-01-04 12:28:47 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-04 12:28:47 +0100
commit2fd206d4250784b498330d7e1f463672c06abc5a (patch)
tree7ad59b3c1ad348e95e1daab86b444eb0968bbff6 /tools/bpf/bpftool/prog.c
parent5620e1a8e2e6f96bdb72abfd68a56ce8cb94dd4d (diff)
parentb4fac96d9a672def4e24c1858adb7e9351471815 (diff)
Merge branch 'bpf-bpftool-misc-fixes'
Jakub Kicinski says: ==================== This series addresses small issues that snuck through the review of cgroup code. "list" and "show" are now made aliases to satisfy all users. Small fix to errors printed is needed, errors can't contain new line characters, otherwise JSON will break. ==================== Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r--tools/bpf/bpftool/prog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index 98f871ed53d6..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;
}
@@ -836,7 +836,7 @@ static int do_help(int argc, char **argv)
}
fprintf(stderr,
- "Usage: %s %s show [PROG]\n"
+ "Usage: %s %s { show | list } [PROG]\n"
" %s %s dump xlated PROG [{ file FILE | opcodes }]\n"
" %s %s dump jited PROG [{ file FILE | opcodes }]\n"
" %s %s pin PROG FILE\n"
@@ -854,6 +854,7 @@ static int do_help(int argc, char **argv)
static const struct cmd cmds[] = {
{ "show", do_show },
+ { "list", do_show },
{ "help", do_help },
{ "dump", do_dump },
{ "pin", do_pin },