strace: Don't try to extract syscall names if they're not going to be used.
This commit is contained in:
parent
05f3bbec85
commit
ea4219a064
@ -33,8 +33,10 @@ _strace()
|
||||
prev=${cur/=*/}
|
||||
cur=${cur/*=/}
|
||||
|
||||
# Import arch-specific syscalls -- not foolproof IMHO
|
||||
#+ --David Paleino
|
||||
case $prev in
|
||||
trace)
|
||||
# Import arch-specific syscalls
|
||||
#+ -- not foolproof IMHO --David Paleino
|
||||
local arch=$(command uname -m)
|
||||
local syscalls=$(awk '/^#define __NR/ {print $2}' \
|
||||
/usr/include/asm/unistd.h | sed -e \
|
||||
@ -50,8 +52,6 @@ _strace()
|
||||
$unistd | sed -e 's/__NR_//')
|
||||
fi
|
||||
|
||||
case $prev in
|
||||
trace)
|
||||
COMPREPLY=( $( compgen -W "$syscalls file process
|
||||
network signal ipc desc all none" -- "$cur") )
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user