diff options
author | Quentin Monnet <qmo@kernel.org> | 2024-04-13 02:14:27 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-04-16 17:58:25 +0200 |
commit | ad2d22b617b7c0ca2cff4da6dc063183822484bb (patch) | |
tree | 84c66b43645315de17e0cde4ef7ac3bf93ad92e6 /tools/bpf/bpftool/iter.c | |
parent | 986e7663f98ec7441d9d948263ec0dda71e7479f (diff) |
bpftool: Address minor issues in bash completion
This commit contains a series of clean-ups and fixes for bpftool's bash
completion file:
- Make sure all local variables are declared as such.
- Make sure variables are initialised before being read.
- Update ELF section ("maps" -> ".maps") for looking up map names in
object files.
- Fix call to _init_completion.
- Move definition for MAP_TYPE and PROG_TYPE higher up in the scope to
avoid defining them multiple times, reuse MAP_TYPE where relevant.
- Simplify completion for "duration" keyword in "bpftool prog profile".
- Fix completion for "bpftool struct_ops register" and "bpftool link
(pin|detach)" where we would repeatedly suggest file names instead of
suggesting just one name.
- Fix completion for "bpftool iter pin ... map MAP" to account for the
"map" keyword.
- Add missing "detach" suggestion for "bpftool link".
Signed-off-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240413011427.14402-3-qmo@kernel.org
Diffstat (limited to 'tools/bpf/bpftool/iter.c')
0 files changed, 0 insertions, 0 deletions