OSDN Git Service

bpftool: Clean up _bpftool_once_attr() calls in bash completion
authorQuentin Monnet <quentin@isovalent.com>
Wed, 5 Apr 2023 13:21:20 +0000 (14:21 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Apr 2023 04:27:27 +0000 (21:27 -0700)
commit7319296855f1bac0e7fb003388f44ecbd4515102
tree2fec7cffe9e8f41a97431a9a055f8f3543464d8d
parent7483a7a70a12d7c00c9f80574d533b01689d39a7
bpftool: Clean up _bpftool_once_attr() calls in bash completion

In bpftool's bash completion file, function _bpftool_once_attr() is able
to process multiple arguments. There are a few locations where this
function is called multiple times in a row, each time for a single
argument; let's pass all arguments instead to minimize the number of
function calls required for the completion.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/r/20230405132120.59886-8-quentin@isovalent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/bash-completion/bpftool