Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev Pull up following revision(s) (requested by nonak...



details:   https://anonhg.NetBSD.org/src/rev/2a59f69cf8a3
branches:  netbsd-9
changeset: 937419:2a59f69cf8a3
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Aug 18 09:36:36 2020 +0000

description:
Pull up following revision(s) (requested by nonaka in ticket #1056):

        sys/dev/ipmi.c: revision 1.5

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 fd0f71e2fa93 -r 2a59f69cf8a3 sys/dev/ipmi.c
--- a/sys/dev/ipmi.c    Tue Aug 18 09:29:52 2020 +0000
+++ b/sys/dev/ipmi.c    Tue Aug 18 09:36: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.4.4.1 2020/08/18 09:36:36 martin 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.4.4.1 2020/08/18 09:36:36 martin 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