From 42715f4e830d994652900d285f1b7f18a612d4e4 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 9 Sep 2016 17:55:46 -0400 Subject: [PATCH] Fix CPU feature flag detection under FreeBSD --- cryptest.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cryptest.sh b/cryptest.sh index 020753cb..97faeeb3 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -153,6 +153,8 @@ if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") ]]; then X86_CPU_FLAGS=$(sysctl machdep.cpu.features 2>&1 | cut -f 2 -d ':') elif [[ ("$IS_SOLARIS" -ne "0") ]]; then X86_CPU_FLAGS=$(isainfo -v 2>/dev/null) + elif [[ ("$IS_FREEBSD" -ne "0") ]]; then + X86_CPU_FLAGS=$(grep Features /var/run/dmesg.boot) else X86_CPU_FLAGS=$(cat /proc/cpuinfo 2>&1 | "$AWK" '{IGNORECASE=1}{if ($1 == "flags"){print;exit}}' | cut -f 2 -d ':') fi