From e6a2c60dc58a0034d5842bd7072142e4943cb55f Mon Sep 17 00:00:00 2001 From: Corey Hickey Date: Fri, 12 Jan 2018 10:13:40 -0800 Subject: [PATCH] correct is_cpu_vulnerable() comment As far as I can tell, the function and usage are correct for the comment to be inverted. Add a clarifying note as to why the value choice makes sense. --- spectre-meltdown-checker.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index cb2f77c..69f2dd5 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -151,7 +151,8 @@ _debug() is_cpu_vulnerable() { # param: 1, 2 or 3 (variant) - # returns 1 if vulnerable, 0 if not vulnerable, 255 on error + # returns 0 if vulnerable, 1 if not vulnerable, 255 on error + # (note that in shell, a return of 0 is success) # by default, everything is vulnerable, we work in a "whitelist" logic here. # usage: is_cpu_vulnerable 2 && do something if vulnerable variant1=0