return (0);
} /* int smart_config */
-static void smart_submit (const char *dev, char *type, char *type_inst, double value)
+static void smart_submit (const char *dev, const char *type,
+ const char *type_inst, double value)
{
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
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 (),
/* Query status with libatasmart */
smart_handle_disk (devpath);
+ udev_device_unref (dev);
}
udev_enumerate_unref (enumerate);