Skip to content

Commit

Permalink
arch: require arch-syscall-dump from arch-syscall-validate
Browse files Browse the repository at this point in the history
The arch-syscall-dump is almost always used from arch-syscall-validate
(the only exception I found is when -c and -l are given), so it makes
sense to check that it's available beforehand.

Without this patch, when arch-syscall-dump is not present, the script
produces lots of output with a few errors about the missing
./arch-syscall-dump hidden in the middle of it.

To keep things simple, we require arch-syscall-dump even when it is not
going to be used.

Signed-off-by: Kir Kolyshkin <[email protected]>
Acked-by: Paul Moore <[email protected]>
Signed-off-by: Tom Hromatka <[email protected]>
  • Loading branch information
kolyshkin authored and drakenclimber committed Sep 21, 2022
1 parent b86e5a3 commit 9fd0aef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/arch-syscall-validate
Original file line number Diff line number Diff line change
Expand Up @@ -845,10 +845,6 @@ while getopts "a:c:slh" opt; do
opt_lib=0
;;
l)
if [[ ! -x $LIB_SYS_DUMP ]]; then
echo "error: \"$LIB_SYS_DUMP\" is not present"
exit 1
fi
opt_sys=0
opt_lib=1
;;
Expand Down Expand Up @@ -883,6 +879,11 @@ if [[ ! -d $kernel_dir ]]; then
exit 1
fi

if [[ ! -x "$LIB_SYS_DUMP" ]]; then
echo "error: \"$LIB_SYS_DUMP\" is not present"
exit 1
fi

# generate some temp files
tmp_lib=$(mktemp -t syscall_validate_XXXXXX)
tmp_sys=$(mktemp -t syscall_validate_XXXXXX)
Expand Down

0 comments on commit 9fd0aef

Please sign in to comment.