avoid fetching hddtemp daemon when no hdd in the sensors list
authorJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 1 May 2011 20:54:14 +0000 (20:54 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 1 May 2011 20:54:14 +0000 (20:54 +0000)
src/lib/psensor.c

index bf7bcb8..8a71781 100644 (file)
@@ -418,5 +418,7 @@ const char *psensor_type_to_str(unsigned int type)
 void psensor_list_update_measures(struct psensor **sensors)
 {
        lmsensor_psensor_list_update(sensors);
-       hdd_psensor_list_update(sensors);
+
+       if (psensor_list_contains_type(sensors, SENSOR_TYPE_HDD_TEMP))
+               hdd_psensor_list_update(sensors);
 }