edgarsuit / FreeNAS-Report

SMART & ZPool Status Report for FreeNAS
GNU General Public License v3.0
113 stars 45 forks source link

Why are we adding 0 to smart error heath value? #35

Open CBattershillDev opened 1 year ago

CBattershillDev commented 1 year ago

I noticed that even with some brand new drives I am getting a warn on seek error health in the report. I then did some digging into the code to better understand the threshold and it seems that anything less than 100 will display the earring colour.

What confused me though was why we are adding 0 to the value does anyone know? Maybe this can be cleaned up?

if ((seekErrorHealth + 0) < 100) seekErrorHealthColor = warnColor; else seekErrorHealthColor = bgColor;