bpftool: add pinmaps argument to the load/loadall

This new additional argument lets users pin all maps from the object at
specified path.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Stanislav Fomichev
2018-11-09 08:21:45 -08:00
committed by Alexei Starovoitov
parent 77380998d9
commit 3767a94b32
3 changed files with 28 additions and 3 deletions

View File

@@ -346,7 +346,7 @@ _bpftool()
_bpftool_get_map_ids
return 0
;;
pinned)
pinned|pinmaps)
_filedir
return 0
;;
@@ -358,6 +358,7 @@ _bpftool()
COMPREPLY=( $( compgen -W "map" -- "$cur" ) )
_bpftool_once_attr 'type'
_bpftool_once_attr 'dev'
_bpftool_once_attr 'pinmaps'
return 0
;;
esac