X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsmart.c;h=2207bd6722449f4de11c3b89a976817ba8702558;hb=ccc4feb9576f520596508418f404beb000fde1aa;hp=f0c189e9e01422de492dc9de9468968df47f3882;hpb=394a4b4a8f9ecb180a4356c59c13df61b5f9f357;p=collectd.git diff --git a/src/smart.c b/src/smart.c index f0c189e9..2207bd67 100644 --- a/src/smart.c +++ b/src/smart.c @@ -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 (), @@ -253,6 +253,7 @@ static int smart_read (void) /* Query status with libatasmart */ smart_handle_disk (devpath); + udev_device_unref (dev); } udev_enumerate_unref (enumerate);