mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-12-04 21:58:18 +00:00
Some fixes for problems with the dyn chip support / generic printing routines which showed up while testing with the abituguru driver
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4364 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
be3ec092a5
commit
78a521b1a8
2 files changed
+8
-2
No files matched your search
@@ -535,9 +535,15 @@ sensors_feature_type sensors_feature_get_type(
|
||||
if (strlen(name) == 3 || strstr(name, "input"))
|
||||
return SENSORS_FEATURE_IN;
|
||||
|
||||
if (strstr(name, "max_alarm"))
|
||||
return SENSORS_FEATURE_IN_MAX_ALARM;
|
||||
|
||||
if (strstr(name, "max"))
|
||||
return SENSORS_FEATURE_IN_MAX;
|
||||
|
||||
if (strstr(name, "min_alarm"))
|
||||
return SENSORS_FEATURE_IN_MIN_ALARM;
|
||||
|
||||
if (strstr(name, "min"))
|
||||
return SENSORS_FEATURE_IN_MIN;
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name,
|
||||
char *label;
|
||||
int valid, type;
|
||||
const int size = SENSORS_FEATURE_TEMP_CRIT - SENSORS_FEATURE_TEMP;
|
||||
short has_features[SENSORS_FEATURE_TEMP_CRIT - SENSORS_FEATURE_TEMP] = {0, };
|
||||
short has_features[SENSORS_FEATURE_TEMP_CRIT - SENSORS_FEATURE_TEMP] = {0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
double feature_vals[SENSORS_FEATURE_TEMP_CRIT - SENSORS_FEATURE_TEMP] = {0.0, };
|
||||
|
||||
if (sensors_get_label_and_valid(*name, feature->number, &label, &valid)) {
|
||||
@@ -224,7 +224,7 @@ static void print_generic_chip_in(const sensors_chip_name *name,
|
||||
{
|
||||
const int size = SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN;
|
||||
int valid;
|
||||
short has_features[SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN] = {0, };
|
||||
short has_features[SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN] = {0, 0, 0, 0, 0 };
|
||||
double feature_vals[SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN] = {0.0, };
|
||||
double val, alarm_max, alarm_min;
|
||||
char *label;
|
||||
|
||||
Reference in new issue
Block a user