mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 06:15:15 +00:00
Fix fan fault handling. We were testing for fan fault before actually
retrieving the fan features, so faults could not be detected. Swapping the instructions fixes it. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4801 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -362,15 +362,15 @@ static void print_chip_fan(const sensors_chip_name *name,
|
||||
print_label(label, label_size);
|
||||
free(label);
|
||||
|
||||
sensors_get_available_features(name, feature, i, has_features,
|
||||
feature_vals, size, SENSORS_FEATURE_FAN);
|
||||
|
||||
if (FAN_FEATURE(SENSORS_FEATURE_FAN_FAULT) &&
|
||||
FAN_FEATURE_VAL(SENSORS_FEATURE_FAN_FAULT))
|
||||
printf(" FAULT");
|
||||
else
|
||||
printf("%4.0f RPM", val);
|
||||
|
||||
sensors_get_available_features(name, feature, i, has_features,
|
||||
feature_vals, size, SENSORS_FEATURE_FAN);
|
||||
|
||||
if (FAN_FEATURE(SENSORS_FEATURE_FAN_MIN) &&
|
||||
FAN_FEATURE(SENSORS_FEATURE_FAN_DIV))
|
||||
printf(" (min = %4.0f RPM, div = %1.0f)",
|
||||
|
Reference in New Issue
Block a user