diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/devices/sensors.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/modules/devices/sensors.c b/modules/devices/sensors.c index e66aac67..ab34b74b 100644 --- a/modules/devices/sensors.c +++ b/modules/devices/sensors.c @@ -235,6 +235,15 @@ static const struct HwmonSensor hwmon_sensors[] = {          1000.0,          0      }, +    { +        "Voltage", +        "%s/cpu%d_vid", +        NULL, +        "cpu%d_vid", +        "V", +        1000.0, +        0 +    },      { }  }; @@ -244,6 +253,9 @@ static gboolean read_raw_hwmon_value(gchar *path_hwmon, const gchar *item_path_f      gchar *full_path;      gboolean file_result; +    if (item_path_format == NULL) +        return FALSE; +      full_path = g_strdup_printf(item_path_format, path_hwmon, item_id);      file_result = g_file_get_contents(full_path, result, NULL, NULL); | 
