Module Name: src Committed By: nonaka Date: Mon Aug 17 08:34:36 UTC 2020
Modified Files: src/sys/dev: ipmi.c Log Message: ipmi(4): Fixed a bug that incorrect condition is notified. When the value obtained from the sensor is below the lower limit of the critical threshold, it is notified that the value is below the lower limit of the warning threshold. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ipmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ipmi.c diff -u src/sys/dev/ipmi.c:1.4 src/sys/dev/ipmi.c:1.5 --- src/sys/dev/ipmi.c:1.4 Sat May 18 08:38:00 2019 +++ src/sys/dev/ipmi.c Mon Aug 17 08:34:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi.c,v 1.4 2019/05/18 08:38:00 mlelstv Exp $ */ +/* $NetBSD: ipmi.c,v 1.5 2020/08/17 08:34:36 nonaka Exp $ */ /* * Copyright (c) 2019 Michael van Elst @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.4 2019/05/18 08:38:00 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.5 2020/08/17 08:34:36 nonaka Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -1632,14 +1632,14 @@ ipmi_sensor_status(struct ipmi_softc *sc edata->value_cur > psensor->i_limits.sel_warnmax) return ENVSYS_SWARNOVER; - if (psensor->i_props & PROP_WARNMIN && - edata->value_cur < psensor->i_limits.sel_warnmin) - return ENVSYS_SWARNUNDER; - if (psensor->i_props & PROP_CRITMIN && edata->value_cur < psensor->i_limits.sel_critmin) return ENVSYS_SCRITUNDER; + if (psensor->i_props & PROP_WARNMIN && + edata->value_cur < psensor->i_limits.sel_warnmin) + return ENVSYS_SWARNUNDER; + break; case IPMI_SENSOR_TYPE_INTRUSION: