Code

smart: when threshold is valid, also test for "less or equal"
authorVincent Bernat <vincent@bernat.im>
Wed, 12 Nov 2014 14:39:42 +0000 (15:39 +0100)
committerVincent Bernat <vincent@bernat.im>
Wed, 12 Nov 2014 14:39:42 +0000 (15:39 +0100)
When the threshold is 0, a value of 0 should hit the threshold.

src/smart.c

index f0c189e9e01422de492dc9de9468968df47f3882..3b113bd33a2d45978622fc0512efe3e11f7eec38 100644 (file)
@@ -109,7 +109,7 @@ static void smart_handle_disk_attribute(SkDisk *d, const SkSmartAttributeParsedD
 
   plugin_dispatch_values (&vl);
 
-  if (a->threshold_valid && a->current_value < a->threshold)
+  if (a->threshold_valid && a->current_value <= a->threshold)
   {
     notification_t notif = { NOTIF_WARNING,
                              cdtime (),