From 9fd0aef44dc103281d1048900a04ac8231fb4d52 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 31 Aug 2022 10:22:37 -0700 Subject: arch: require arch-syscall-dump from arch-syscall-validate 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 Acked-by: Paul Moore Signed-off-by: Tom Hromatka --- src/arch-syscall-validate | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate index 6773b03..082ac56 100755 --- a/src/arch-syscall-validate +++ b/src/arch-syscall-validate @@ -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 ;; @@ -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) -- cgit v1.2.1