Show
Ignore:
Timestamp:
04/10/07 13:51:07 (8 years ago)
Author:
jwrdegoede
Message:

-rewrite dyn chip code, it now uses sensors_feature_get_type() to

identify sysfs entries. Reasons for this rewrite / bugs fixed:
-Don't give features like alarms / sensor type / fault flag a

compute mapping only a normal mapping

-Don't generate features for sysfs entries like uvent, modalias, etc.

instead only generate features for features known by
sensors_feature_get_type()

-Sort the list of found features logically instead of sorted in alphabet order

of the sysfs entry. So now it starts with all in entries, then all fan and
then all temp. Just like the order of most entries in lib/chips.c. Also
this means that it now contains in0 - in10 in that order and not in0, in10,
in1 - in9

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/chips_generic.c

    r4366 r4368  
    111111  char *label; 
    112112  int valid, type; 
    113   const int size = SENSORS_FEATURE_TEMP_CRIT - SENSORS_FEATURE_TEMP; 
    114   short has_features[SENSORS_FEATURE_TEMP_CRIT - SENSORS_FEATURE_TEMP] = {0, 0, 0, 0, 0, 0, 0, 0, 0 }; 
    115   double feature_vals[SENSORS_FEATURE_TEMP_CRIT - SENSORS_FEATURE_TEMP] = {0.0, }; 
     113  const int size = SENSORS_FEATURE_TEMP_SENS - SENSORS_FEATURE_TEMP; 
     114  short has_features[SENSORS_FEATURE_TEMP_SENS - SENSORS_FEATURE_TEMP] = {0, }; 
     115  double feature_vals[SENSORS_FEATURE_TEMP_SENS - SENSORS_FEATURE_TEMP] = {0.0, }; 
    116116   
    117117  if (sensors_get_label_and_valid(*name, feature->number, &label, &valid)) { 
     
    255255  const int size = SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN; 
    256256  int valid; 
    257   short has_features[SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN] = {0, 0, 0, 0, 0 }; 
     257  short has_features[SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN] = {0, }; 
    258258  double feature_vals[SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN] = {0.0, }; 
    259259  double val, alarm_max, alarm_min;