mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 06:15:15 +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:
@@ -169,7 +169,6 @@ typedef enum sensors_feature_type {
|
|||||||
SENSORS_FEATURE_TEMP_MAX,
|
SENSORS_FEATURE_TEMP_MAX,
|
||||||
SENSORS_FEATURE_TEMP_MAX_HYST,
|
SENSORS_FEATURE_TEMP_MAX_HYST,
|
||||||
SENSORS_FEATURE_TEMP_MIN,
|
SENSORS_FEATURE_TEMP_MIN,
|
||||||
SENSORS_FEATURE_TEMP_LIM,
|
|
||||||
SENSORS_FEATURE_TEMP_CRIT,
|
SENSORS_FEATURE_TEMP_CRIT,
|
||||||
SENSORS_FEATURE_TEMP_CRIT_HYST,
|
SENSORS_FEATURE_TEMP_CRIT_HYST,
|
||||||
SENSORS_FEATURE_TEMP_ALARM = 0x210,
|
SENSORS_FEATURE_TEMP_ALARM = 0x210,
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
#include "kernel/include/sensors.h"
|
#include "kernel/include/sensors.h"
|
||||||
|
|
||||||
void print_label(const char *label, int space);
|
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 );
|
static inline float deg_ctof( float );
|
||||||
|
|
||||||
extern int fahrenheit;
|
extern int fahrenheit;
|
||||||
@@ -45,7 +44,7 @@ inline float deg_ctof( float cel )
|
|||||||
curprec and limitprec are # of digits after decimal point
|
curprec and limitprec are # of digits after decimal point
|
||||||
for the current temp and the limits
|
for the current temp and the limits
|
||||||
note: symbolic constants defined in chips.h */
|
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)
|
int minmax, int curprec, int limitprec)
|
||||||
{
|
{
|
||||||
if (fahrenheit) {
|
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) ",
|
printf("%+6.*f%s (hyst = %+5.*f%s) ",
|
||||||
curprec, n_cur, degstr,
|
curprec, n_cur, degstr,
|
||||||
limitprec, n_over, 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
|
else
|
||||||
printf("Unknown temperature mode!");
|
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)
|
void print_label(const char *label, int space)
|
||||||
{
|
{
|
||||||
int len=strlen(label)+1;
|
int len=strlen(label)+1;
|
||||||
|
@@ -85,8 +85,7 @@ extern void print_dme1737(const sensors_chip_name *name);
|
|||||||
#define CRIT 3
|
#define CRIT 3
|
||||||
#define SINGLE 4
|
#define SINGLE 4
|
||||||
#define HYSTONLY 5
|
#define HYSTONLY 5
|
||||||
#define LIM 6
|
void print_temp_info(float n_cur, float n_over, float n_hyst,
|
||||||
void print_temp_info_real(float n_cur, float n_over, float n_hyst, float n_lim,
|
|
||||||
int minmax, int curprec, int limitprec);
|
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);
|
void print_vid_info_real(const sensors_chip_name *name, int f_vid, int f_vrm, int label_size);
|
||||||
|
@@ -107,7 +107,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name,
|
|||||||
const sensors_feature_data *feature,
|
const sensors_feature_data *feature,
|
||||||
int i, int j, int label_size)
|
int i, int j, int label_size)
|
||||||
{
|
{
|
||||||
double val, max, min, lim = 0.0;
|
double val, max, min;
|
||||||
char *label;
|
char *label;
|
||||||
int valid, type;
|
int valid, type;
|
||||||
const int size = SENSORS_FEATURE_TEMP_SENS - SENSORS_FEATURE_TEMP;
|
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)) {
|
if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_MIN)) {
|
||||||
min = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_MIN);
|
min = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_MIN);
|
||||||
|
type = MINMAX;
|
||||||
if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_LIM)) {
|
|
||||||
lim = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_LIM);
|
|
||||||
type = LIM;
|
|
||||||
} else {
|
|
||||||
type = MINMAX;
|
|
||||||
}
|
|
||||||
} else if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_MAX_HYST)) {
|
} else if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_MAX_HYST)) {
|
||||||
min = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_MAX_HYST);
|
min = TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_MAX_HYST);
|
||||||
type = HYST;
|
type = HYST;
|
||||||
@@ -162,11 +156,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name,
|
|||||||
print_label(label, label_size);
|
print_label(label, label_size);
|
||||||
free(label);
|
free(label);
|
||||||
|
|
||||||
if (type == LIM) {
|
print_temp_info(val, max, min, type, 1, 1);
|
||||||
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 out temperature sensor info */
|
/* print out temperature sensor info */
|
||||||
if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_SENS)) {
|
if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_SENS)) {
|
||||||
@@ -216,7 +206,7 @@ static void print_generic_chip_temp(const sensors_chip_name *name,
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
print_label(label, label_size);
|
print_label(label, label_size);
|
||||||
free(label);
|
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) &&
|
if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_CRIT_ALARM) &&
|
||||||
TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_CRIT_ALARM) > 0.5) {
|
TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_CRIT_ALARM) > 0.5) {
|
||||||
printf(" ALARM");
|
printf(" ALARM");
|
||||||
|
Reference in New Issue
Block a user