2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 13:57:41 +00:00

Drop SENSORS_FEATURE_TEMP_LIM, it doesn't correspond to anything in the

standard sysfs interface.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4428 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare 2007-05-29 16:49:06 +00:00
parent 33a3d6fba2
commit 768be0b9c0
4 changed files with 6 additions and 31 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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");