diff options
Diffstat (limited to 'modules/devices')
-rw-r--r-- | modules/devices/sensors.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/devices/sensors.c b/modules/devices/sensors.c index e93668f0..1469c13e 100644 --- a/modules/devices/sensors.c +++ b/modules/devices/sensors.c @@ -34,10 +34,6 @@ static void read_sensor_labels(gchar * driver) gboolean lock = FALSE; gint i; - sensor_labels = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, g_free); - sensor_compute = g_hash_table_new(g_str_hash, g_str_equal); - /* Try to open lm-sensors config file sensors3.conf */ conf = fopen("/etc/sensors3.conf", "r"); @@ -395,3 +391,16 @@ void scan_sensors_do(void) /* FIXME: Add support for ibm acpi and more sensors */ } + +void sensors_init(void) +{ + sensor_labels = g_hash_table_new_full(g_str_hash, g_str_equal, + g_free, g_free); + sensor_compute = g_hash_table_new(g_str_hash, g_str_equal); +} + +void sensors_shutdown(void) +{ + g_hash_table_destroy(sensor_labels); + g_hash_table_destroy(sensor_compute); +} |