diff --git a/lib/sensors.h b/lib/sensors.h index 9528bb6d..deb31e7a 100644 --- a/lib/sensors.h +++ b/lib/sensors.h @@ -169,7 +169,6 @@ typedef enum sensors_feature_type { SENSORS_FEATURE_TEMP_MAX, SENSORS_FEATURE_TEMP_MAX_HYST, SENSORS_FEATURE_TEMP_MIN, - SENSORS_FEATURE_TEMP_LIM, SENSORS_FEATURE_TEMP_CRIT, SENSORS_FEATURE_TEMP_CRIT_HYST, SENSORS_FEATURE_TEMP_ALARM = 0x210, diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index af468f48..ee173337 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -30,7 +30,6 @@ #include "kernel/include/sensors.h" void print_label(const char *label, int space); -static void print_temp_info(float, float, float, int, int, int); static inline float deg_ctof( float ); extern int fahrenheit; @@ -45,7 +44,7 @@ inline float deg_ctof( float cel ) curprec and limitprec are # of digits after decimal point for the current temp and the limits note: symbolic constants defined in chips.h */ -void print_temp_info_real(float n_cur, float n_over, float n_hyst, float n_lim, +void print_temp_info(float n_cur, float n_over, float n_hyst, int minmax, int curprec, int limitprec) { if (fahrenheit) { @@ -81,22 +80,10 @@ void print_temp_info_real(float n_cur, float n_over, float n_hyst, float n_lim, printf("%+6.*f%s (hyst = %+5.*f%s) ", curprec, n_cur, degstr, limitprec, n_over, degstr); - else if(minmax == LIM) - printf("%+6.*f%s (low = %+5.*f%s, high = %+5.*f%s, lim = %+5.*f%s) ", - curprec, n_cur, degstr, - limitprec, n_hyst, degstr, - limitprec, n_over, degstr, - limitprec, n_lim, degstr); else printf("Unknown temperature mode!"); } -void print_temp_info(float n_cur, float n_over, float n_hyst, - int minmax, int curprec, int limitprec) -{ - print_temp_info_real(n_cur, n_over, n_hyst, 0, minmax, curprec, limitprec); -} - void print_label(const char *label, int space) { int len=strlen(label)+1; diff --git a/prog/sensors/chips.h b/prog/sensors/chips.h index 82e525b0..a2525526 100644 --- a/prog/sensors/chips.h +++ b/prog/sensors/chips.h @@ -85,8 +85,7 @@ extern void print_dme1737(const sensors_chip_name *name); #define CRIT 3 #define SINGLE 4 #define HYSTONLY 5 -#define LIM 6 -void print_temp_info_real(float n_cur, float n_over, float n_hyst, float n_lim, +void print_temp_info(float n_cur, float n_over, float n_hyst, int minmax, int curprec, int limitprec); void print_vid_info_real(const sensors_chip_name *name, int f_vid, int f_vrm, int label_size); diff --git a/prog/sensors/chips_generic.c b/prog/sensors/chips_generic.c index ccca26e6..957c5100 100644 --- a/prog/sensors/chips_generic.c +++ b/prog/sensors/chips_generic.c @@ -107,7 +107,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name, const sensors_feature_data *feature, int i, int j, int label_size) { - double val, max, min, lim = 0.0; + double val, max, min; char *label; int valid, type; const int size = SENSORS_FEATURE_TEMP_SENS - SENSORS_FEATURE_TEMP; @@ -137,13 +137,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name, if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_MIN)) { min = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_MIN); - - if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_LIM)) { - lim = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_LIM); - type = LIM; - } else { - type = MINMAX; - } + type = MINMAX; } else if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_MAX_HYST)) { min = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_MAX_HYST); type = HYST; @@ -162,11 +156,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name, print_label(label, label_size); free(label); - if (type == LIM) { - print_temp_info_real(val, max, min, lim, type, 1, 1); - } else { - print_temp_info_real(val, max, min, 0.0, type, 1, 1); - } + print_temp_info(val, max, min, type, 1, 1); /* print out temperature sensor info */ if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_SENS)) { @@ -216,7 +206,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name, if (valid) { print_label(label, label_size); free(label); - print_temp_info_real(max, min, 0, 0.0, type, 1, 1); + print_temp_info(max, min, 0, type, 1, 1); if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_CRIT_ALARM) && TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_CRIT_ALARM) > 0.5) { printf(" ALARM");