mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2026-04-09 10:13:18 +02:00
chore: make fmt
This commit is contained in:
@@ -344,4 +344,3 @@ if [ "$opt_runtime" = 0 ] && [ -z "$opt_kernel" ] && [ -z "$opt_config" ] && [ -
|
||||
pr_warn "Option --no-runtime requires at least one of --kernel, --config, or --map"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ _json_cap() {
|
||||
case "${1:-}" in
|
||||
1) printf 'true' ;;
|
||||
0) printf 'false' ;;
|
||||
-1|'') printf 'null' ;;
|
||||
-1 | '') printf 'null' ;;
|
||||
*) printf '"%s"' "$(_json_escape "$1")" ;;
|
||||
esac
|
||||
}
|
||||
@@ -349,9 +349,18 @@ _emit_nrpe() {
|
||||
_emit_prometheus() {
|
||||
local numeric_status cpu_affected full_name esc_name
|
||||
case "$3" in
|
||||
OK) numeric_status=0 ; g_smc_ok_count=$((g_smc_ok_count + 1)) ;;
|
||||
VULN) numeric_status=1 ; g_smc_vuln_count=$((g_smc_vuln_count + 1)) ;;
|
||||
UNK) numeric_status=2 ; g_smc_unk_count=$((g_smc_unk_count + 1)) ;;
|
||||
OK)
|
||||
numeric_status=0
|
||||
g_smc_ok_count=$((g_smc_ok_count + 1))
|
||||
;;
|
||||
VULN)
|
||||
numeric_status=1
|
||||
g_smc_vuln_count=$((g_smc_vuln_count + 1))
|
||||
;;
|
||||
UNK)
|
||||
numeric_status=2
|
||||
g_smc_unk_count=$((g_smc_unk_count + 1))
|
||||
;;
|
||||
*)
|
||||
echo "$0: error: unknown status '$3' passed to _emit_prometheus()" >&2
|
||||
exit 255
|
||||
|
||||
Reference in New Issue
Block a user