- Timestamp:
- 09/30/07 19:56:19 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/chips.c
r4900 r4910 149 149 150 150 sf = sensors_get_subfeature(name, feature, 151 SENSORS_SUBFEATURE_TEMP_INPUT);152 val = sf ? get_value(name, sf) : 0;153 154 sf = sensors_get_subfeature(name, feature,155 151 SENSORS_SUBFEATURE_TEMP_ALARM); 156 152 alarm = sf && get_value(name, sf); … … 231 227 printf(" FAULT "); 232 228 } else { 233 if (fahrenheit) 234 val = deg_ctof(val); 235 printf("%+6.1f%s ", val, degstr); 229 sf = sensors_get_subfeature(name, feature, 230 SENSORS_SUBFEATURE_TEMP_INPUT); 231 if (sf) { 232 val = get_value(name, sf); 233 if (fahrenheit) 234 val = deg_ctof(val); 235 printf("%+6.1f%s ", val, degstr); 236 } else 237 printf(" N/A "); 236 238 } 237 239 print_temp_limits(limit1, limit2, s1, s2, alarm); … … 351 353 const sensors_subfeature *sf, *sfmin, *sfdiv; 352 354 char *label; 353 double val;354 355 355 356 if (!(label = sensors_get_label(name, feature))) { … … 362 363 363 364 sf = sensors_get_subfeature(name, feature, 364 SENSORS_SUBFEATURE_FAN_INPUT);365 val = sf ? get_value(name, sf) : 0;366 sf = sensors_get_subfeature(name, feature,367 365 SENSORS_SUBFEATURE_FAN_FAULT); 368 366 if (sf && get_value(name, sf)) 369 367 printf(" FAULT"); 370 else 371 printf("%4.0f RPM", val); 368 else { 369 sf = sensors_get_subfeature(name, feature, 370 SENSORS_SUBFEATURE_FAN_INPUT); 371 if (sf) 372 printf("%4.0f RPM", get_value(name, sf)); 373 else 374 printf(" N/A"); 375 } 372 376 373 377 sfmin = sensors_get_subfeature(name, feature,
