Module Name: src
Committed By: pgoyette
Date: Wed Dec 23 18:31:00 UTC 2009
Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c
Log Message:
Check for value exceeding crit-max limit before checking against warn-max
limit. Otherwise we'll never notice if we exceed crit-max (assuming that
crit-max is at least as large as warn-max).
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/sysmon/sysmon_envsys_events.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/sysmon/sysmon_envsys_events.c
diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.71 src/sys/dev/sysmon/sysmon_envsys_events.c:1.72
--- src/sys/dev/sysmon/sysmon_envsys_events.c:1.71 Fri Jul 10 15:27:33 2009
+++ src/sys/dev/sysmon/sysmon_envsys_events.c Wed Dec 23 18:31:00 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.71 2009/07/10 15:27:33 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.72 2009/12/23 18:31:00 pgoyette Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.71 2009/07/10 15:27:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.72 2009/12/23 18:31:00 pgoyette Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -671,10 +671,10 @@
else if __EXCEED_LIM(PROP_WARNMIN | PROP_BATTWARN,
sel_warnmin, <)
edata->state = ENVSYS_SWARNUNDER;
- else if __EXCEED_LIM(PROP_WARNMAX, sel_warnmax, >)
- edata->state = ENVSYS_SWARNOVER;
else if __EXCEED_LIM(PROP_CRITMAX, sel_critmax, >)
edata->state = ENVSYS_SCRITOVER;
+ else if __EXCEED_LIM(PROP_WARNMAX, sel_warnmax, >)
+ edata->state = ENVSYS_SWARNOVER;
}
#undef __EXCEED_LIM