scripts/bash_aliases: man_lsfunc(): Extract syscall name from syscall(SYS_...)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-05-10 19:55:23 +02:00 committed by Michael Kerrisk
parent e59830eda9
commit 1ad9eda841
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ function man_lsfunc()
|sed_rm_ccomments \
|pcregrep -Mn '(?s)^ [\w ]+ \**\w+\([\w\s(,)[\]*]+?(...)?\s*\); *$' \
|grep '^[0-9]' \
|sed 's/syscall(SYS_\(\w*\),/\1(/' \
|sed -E 's/^[^(]+ \**(\w+)\(.*/\1/' \
|uniq;
}