mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2026-04-01 12:47:07 +02:00
POSIX compatibility fix: sed -r => sed -E
This commit is contained in:
@@ -18,7 +18,7 @@ _pr_echo_raw() {
|
|||||||
interpret_chars='-e'
|
interpret_chars='-e'
|
||||||
fi
|
fi
|
||||||
ctrlchar=$($g_echo_cmd $interpret_chars "\033")
|
ctrlchar=$($g_echo_cmd $interpret_chars "\033")
|
||||||
msg=$($g_echo_cmd $interpret_chars "$msg" | sed -r "s/$ctrlchar\[([0-9][0-9]?(;[0-9][0-9]?)?)?m//g")
|
msg=$($g_echo_cmd $interpret_chars "$msg" | sed -E "s/$ctrlchar\[([0-9][0-9]?(;[0-9][0-9]?)?)?m//g")
|
||||||
fi
|
fi
|
||||||
if [ "$g_echo_cmd_type" = printf ]; then
|
if [ "$g_echo_cmd_type" = printf ]; then
|
||||||
if [ "$opt" = "-n" ]; then
|
if [ "$opt" = "-n" ]; then
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ parse_cpu_details() {
|
|||||||
|
|
||||||
# also define those that we will need in other funcs
|
# also define those that we will need in other funcs
|
||||||
# taken from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/include/asm/intel-family.h
|
# taken from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/include/asm/intel-family.h
|
||||||
# curl -s 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/arch/x86/include/asm/intel-family.h' | awk '/#define INTEL_FAM6/ {print $2"=$(( "$3" )) # "$4,$5,$6,$7,$8,$9}' | sed -re 's/ +$//'
|
# curl -s 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/arch/x86/include/asm/intel-family.h' | awk '/#define INTEL_FAM6/ {print $2"=$(( "$3" )) # "$4,$5,$6,$7,$8,$9}' | sed -Ee 's/ +$//'
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
{
|
{
|
||||||
readonly INTEL_FAM6_CORE_YONAH=$((0x0E)) #
|
readonly INTEL_FAM6_CORE_YONAH=$((0x0E)) #
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ is_latest_known_ucode() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
ucode=$(($(echo "$tuple" | cut -d, -f4)))
|
ucode=$(($(echo "$tuple" | cut -d, -f4)))
|
||||||
ucode_date=$(echo "$tuple" | cut -d, -f5 | sed -r 's=(....)(..)(..)=\1/\2/\3=')
|
ucode_date=$(echo "$tuple" | cut -d, -f5 | sed -E 's=(....)(..)(..)=\1/\2/\3=')
|
||||||
pr_debug "is_latest_known_ucode: with cpuid $cpu_cpuid has ucode $cpu_ucode, last known is $ucode from $ucode_date"
|
pr_debug "is_latest_known_ucode: with cpuid $cpu_cpuid has ucode $cpu_ucode, last known is $ucode from $ucode_date"
|
||||||
ret_is_latest_known_ucode_latest=$(printf "latest version is 0x%x dated $ucode_date according to $g_mcedb_info" "$ucode")
|
ret_is_latest_known_ucode_latest=$(printf "latest version is 0x%x dated $ucode_date according to $g_mcedb_info" "$ucode")
|
||||||
if [ "$cpu_ucode" -ge "$ucode" ]; then
|
if [ "$cpu_ucode" -ge "$ucode" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user