summaryrefslogtreecommitdiffstats
path: root/web/attachments/426873-check_ide_smart-fix-threshold.patch
blob: 422ead1149af6f04457b2b54e4fdd7ef87fd1aba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff -r -u nagiosplug-2011-10-26/plugins/check_ide_smart.c nagiosplug/plugins/check_ide_smart.c
--- nagiosplug-2011-10-26/plugins/check_ide_smart.c	2011-10-25 10:56:37.534927918 +0200
+++ nagiosplug/plugins/check_ide_smart.c	2011-10-25 11:01:51.867256194 +0200
@@ -311,7 +311,7 @@
 	int i;
 	for (i = 0; i < NR_ATTRIBUTES; i++) {
 		if (value->id && threshold->id && value->id == threshold->id) {
-			if (value->value <= threshold->threshold) {
+			if (value->value < threshold->threshold) {
 				++failed;
 			}
 			else {
@@ -340,7 +340,7 @@
 	int i;
 	for (i = 0; i < NR_ATTRIBUTES; i++) {
 		if (value->id && threshold->id && value->id == threshold->id) {
-			if (value->value <= threshold->threshold) {
+			if (value->value < threshold->threshold) {
 				++failed;
 				if (value->status & 1) {
 					status = PREFAILURE;
@@ -397,7 +397,7 @@
 	printf ("Id=%3d, Status=%2d {%s , %s}, Value=%3d, Threshold=%3d, %s\n",
 					p->id, p->status, p->status & 1 ? "PreFailure" : "Advisory   ",
 					p->status & 2 ? "OnLine " : "OffLine", p->value, t->threshold,
-					p->value > t->threshold ? "Passed" : "Failed");
+					p->value >= t->threshold ? "Passed" : "Failed");
 }