ports/159524: [PATCH] fix net-SNMP 5.7 returning free diskspace in HOST-RESOURCES-MIB::hrStorageUsed
Rene Henzinger
henzinger at burda-ic.com
Fri Aug 5 09:40:06 UTC 2011
>Number: 159524
>Category: ports
>Synopsis: [PATCH] fix net-SNMP 5.7 returning free diskspace in HOST-RESOURCES-MIB::hrStorageUsed
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Aug 05 09:40:04 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Rene Henzinger
>Release: FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
FreeBSD admsto01.alaplaya.net 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Mon Jul 11 13:58:35 CEST 2011 root at admsto01.alaplaya.net:/usr/obj/usr/src/sys/GENERI
C amd64
>Description:
[PATCH] fix net-SNMP 5.7 returning free diskspace in HOST-RESOURCES-MIB::hrStorageUsed
>How-To-Repeat:
install net-SNMP 5.7 from ports and request HOST-RESOURCES-MIB::hrStorageUsed
compare it to df output
>Fix:
--- patch-agent__mibgroup__hardware__fsys__fsys_getfsstats.c begins here ---
--- ./agent/mibgroup/hardware/fsys/fsys_getfsstats.c.orig 2011-08-05 10:20:55.000000000 +0200
+++ ./agent/mibgroup/hardware/fsys/fsys_getfsstats.c 2011-08-05 10:21:38.000000000 +0200
@@ -156,7 +156,7 @@
entry->device[sizeof(entry->device)-1] = '\0';
entry->units = stats[i].f_bsize; /* or f_frsize */
entry->size = stats[i].f_blocks;
- entry->used = stats[i].f_bfree;
+ entry->used = stats[i].f_blocks - stats[i].f_bfree;
entry->avail = stats[i].f_bavail;
entry->inums_total = stats[i].f_files;
entry->inums_avail = stats[i].f_ffree;
--- patch-agent__mibgroup__hardware__fsys__fsys_getfsstats.c ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list