2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00

add sensor type selection in /proc for it87

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2053 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2003-11-12 01:36:12 +00:00
parent 3a0da75647
commit b1741b5366
6 changed files with 97 additions and 3 deletions

View File

@@ -3019,7 +3019,7 @@ void print_eeprom(const sensors_chip_name *name)
void print_it87(const sensors_chip_name *name)
{
char *label = NULL;
double cur, min, max, fdiv;
double cur, min, max, fdiv, sens;
int alarms, valid;
if (!sensors_get_feature(*name,SENSORS_IT87_ALARMS, &cur)) {
@@ -3176,10 +3176,13 @@ void print_it87(const sensors_chip_name *name)
if (!sensors_get_label_and_valid(*name,SENSORS_IT87_TEMP1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP1,&cur) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP1_LOW,&min) &&
!sensors_get_feature(*name,SENSORS_IT87_SENS1,&sens) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP1_HIGH,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, MINMAX, 0, 0);
printf(" sensor = %s ", (((int)sens)==3) ? "diode" :
(((int)sens)==2) ? "thermistor" : "invalid");
printf( " %s\n", alarms & IT87_ALARM_TEMP1 ? "ALARM" : "" );
}
} else
@@ -3188,10 +3191,13 @@ void print_it87(const sensors_chip_name *name)
if (!sensors_get_label_and_valid(*name,SENSORS_IT87_TEMP2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP2,&cur) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP2_LOW,&min) &&
!sensors_get_feature(*name,SENSORS_IT87_SENS2,&sens) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP2_HIGH,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, MINMAX, 0, 0);
printf(" sensor = %s ", (((int)sens)==3) ? "diode" :
(((int)sens)==2) ? "thermistor" : "invalid");
printf( " %s\n", alarms & IT87_ALARM_TEMP2 ? "ALARM" : "" );
}
} else
@@ -3200,10 +3206,13 @@ void print_it87(const sensors_chip_name *name)
if (!sensors_get_label_and_valid(*name,SENSORS_IT87_TEMP3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP3,&cur) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP3_LOW,&min) &&
!sensors_get_feature(*name,SENSORS_IT87_SENS3,&sens) &&
!sensors_get_feature(*name,SENSORS_IT87_TEMP3_HIGH,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, MINMAX, 0, 0);
printf(" sensor = %s ", (((int)sens)==3) ? "diode" :
(((int)sens)==2) ? "thermistor" : "invalid");
printf( " %s\n", alarms & IT87_ALARM_TEMP3 ? "ALARM" : "" );
}
} else