Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev ipmi(4): Fixed a bug that incorrect condition is not...



details:   https://anonhg.NetBSD.org/src/rev/fa2d8c9ffa2b
branches:  trunk
changeset: 942731:fa2d8c9ffa2b
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Mon Aug 17 08:34:36 2020 +0000

description:
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.

diffstat:

 sys/dev/ipmi.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r aea0c575e344 -r fa2d8c9ffa2b sys/dev/ipmi.c
--- a/sys/dev/ipmi.c    Mon Aug 17 08:23:30 2020 +0000
+++ b/sys/dev/ipmi.c    Mon Aug 17 08:34:36 2020 +0000
@@ -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 @@
                    edata->value_cur > psensor->i_limits.sel_warnmax)
                        return ENVSYS_SWARNOVER;
 
+               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;
 
-               if (psensor->i_props & PROP_CRITMIN &&
-                   edata->value_cur < psensor->i_limits.sel_critmin)
-                       return ENVSYS_SCRITUNDER;
-
                break;
 
        case IPMI_SENSOR_TYPE_INTRUSION:



Home | Main Index | Thread Index | Old Index