summaryrefslogtreecommitdiff
path: root/net/nagios-plugins/patches/patch-913085
blob: 48796885e04c828b92a90c021d5e61664846a772 (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
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-913085,v 1.1 2013/08/28 12:14:49 manu Exp $

Bugfix from upstream: do not send error when value is just on limit
https://bugzilla.redhat.com/show_bug.cgi?id=913085

--- plugins/check_ide_smart.c.orig	2013-08-28 14:05:08.000000000 +0200
+++ plugins/check_ide_smart.c	2013-08-28 14:05:15.000000000 +0200
@@ -361,9 +361,9 @@
 	int passed = 0;
 	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 {
 				++passed;
@@ -390,9 +390,9 @@
 	int total = 0;
 	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;
 					++prefailure;
@@ -447,9 +447,9 @@
 {
 	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");
 }