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 f0c189e..3b113bd 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 (),