2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +00:00

Patches by Aurelien Jarno:

I found a small bug in sensors and sensord when used with a w83781d
chip. On this chip the alarms for temp2 and temp3 are merged. However
that is not handled in sensors and sensord.

Please find attached two patches to fix that, one concerning sensors and
the other one concerning sensord.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2511 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2004-05-08 12:24:16 +00:00
parent f032b85a9d
commit 16628b5165
2 changed files with 58 additions and 7 deletions

View File

@@ -2080,8 +2080,9 @@ void print_w83781d(const sensors_chip_name *name)
char *label = NULL;
double cur,min,max,fdiv,sens;
int alarms,beeps;
int is82d, is83s, is697hf, is627thf, valid;
int is81d, is82d, is83s, is697hf, is627thf, valid;
is81d = !strcmp(name->prefix,"w83781d");
is82d = (!strcmp(name->prefix,"w83782d")) ||
(!strcmp(name->prefix,"w83627hf")) ||
(!strcmp(name->prefix,"w83637hf")) ||
@@ -2343,8 +2344,12 @@ void print_w83781d(const sensors_chip_name *name)
if(!is82d) {
print_label(label,10);
print_temp_info( cur, max, min, HYST, 1, 0);
printf(" %s %s\n", alarms&W83781D_ALARM_TEMP3 ?"ALARM":" ",
beeps&W83781D_ALARM_TEMP3?"(beep)":"");
if (!is81d)
printf(" %s %s\n", alarms&W83781D_ALARM_TEMP3?"ALARM":" ",
beeps&W83781D_ALARM_TEMP3?"(beep)":"");
else
printf(" %s %s\n", alarms&W83781D_ALARM_TEMP23?"ALARM":" ",
beeps&W83781D_ALARM_TEMP23?"(beep)":"");
} else {
if(!sensors_get_feature(*name,SENSORS_W83781D_SENS3,&sens)) {
print_label(label,10);