]> git.pld-linux.org Git - packages/net-snmp.git/blame - bug-3460364.patch
- backport bug 3460364 (Fix use of block factor when detecting error conditions)
[packages/net-snmp.git] / bug-3460364.patch
CommitLineData
00443772
ER
1From: Dave Shield <D.T.Shield@liverpool.ac.uk>
2Date: Tue, 28 Feb 2012 10:44:41 +0000 (+0000)
3Subject: CHANGES: snmpd: BUGS: 3460364: Fix use of block factor when detecting error conditions
4X-Git-Tag: v5.6.2.pre1~18
5X-Git-Url: http://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp%2Fnet-snmp;a=commitdiff_plain;h=879bf7079d34fa46f6fcf54a01c8500beaece59a
6
7CHANGES: snmpd: BUGS: 3460364: Fix use of block factor when detecting error conditions
8---
9
10diff --git a/agent/mibgroup/ucd-snmp/disk_hw.c b/agent/mibgroup/ucd-snmp/disk_hw.c
11index ba26479..2b80476 100644
12--- a/agent/mibgroup/ucd-snmp/disk_hw.c
13+++ b/agent/mibgroup/ucd-snmp/disk_hw.c
14@@ -389,8 +389,9 @@ tryAgain:
15
16 case ERRORFLAG:
17 long_ret = 0;
18+ val = netsnmp_fsys_avail_ull(entry);
19 if (( entry->minspace >= 0 ) &&
20- ( entry->avail < entry->minspace ))
21+ ( val < entry->minspace ))
22 long_ret = 1;
23 else if (( entry->minpercent >= 0 ) &&
24 (_percent( entry->avail, entry->size ) < entry->minpercent ))
25@@ -399,12 +400,13 @@ tryAgain:
26
27 case ERRORMSG:
28 errmsg[0] = 0;
29+ val = netsnmp_fsys_avail_ull(entry);
30 if (( entry->minspace >= 0 ) &&
31- ( entry->avail < entry->minspace ))
32+ ( val < entry->minspace ))
33 snprintf(errmsg, sizeof(errmsg),
34 "%s: less than %d free (= %d)",
35 entry->path, entry->minspace,
36- (int) entry->avail);
37+ (int) val);
38 else if (( entry->minpercent >= 0 ) &&
39 (_percent( entry->avail, entry->size ) < entry->minpercent ))
40 snprintf(errmsg, sizeof(errmsg),
This page took 0.067834 seconds and 4 git commands to generate.