analyze: add syscall-filter verb

This should make it easier for users to understand what each filter
means as the list of syscalls is updated in subsequent systemd versions.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-11-03 09:35:35 -04:00
parent 7fa6328cc4
commit 869feb3388
5 changed files with 101 additions and 25 deletions
+6
View File
@@ -45,6 +45,7 @@ _systemd_analyze() {
[DOT]='dot'
[LOG_LEVEL]='set-log-level'
[VERIFY]='verify'
[SECCOMP_FILTER]='syscall-filter'
)
_init_completion || return
@@ -100,6 +101,11 @@ _systemd_analyze() {
comps='debug info notice warning err crit alert emerg'
fi
elif __contains_word "$verb" ${VERBS[SECCOMP_FILTER]}; then
if [[ $cur = -* ]]; then
comps='--help --version'
fi
elif __contains_word "$verb" ${VERBS[VERIFY]}; then
if [[ $cur = -* ]]; then
comps='--help --version --system --user --man'