> Although this fixes the FreeBSD 5.x compile bug, I think there is
> something flawed in the code surrounding the patch.
> 
> Why calculate inode percentage every time through this function ?

> I think that the patch freebsd5-net51-disk retains the spirit of
> the implementation, is more maintainable (because it is easier to read),
> and defers calculation until needed.

But is this actually broken?  Does it give the wrong answers?
Remember that the 5.1.x line is a *bug-fix* branch
(and a relatively mature one at that).

I'd suggest that by now, the default principle for this line
should be "if in doubt, leave it out".
  If things are wrong, sure - fix them.   But if it's just a
case of "this could be done better", then that belongs in 5.2




> It seems that comparing the presence of "statvfs" and "statfs"
> objects in the same pre-processor statement is not the best approach.

Looking at the code, my gut reaction is that the original test in the
configure script is possibly wrong.  Surely it should be looking for
the 'f_favail' field in "struct statvfs" rather than "struct statfs" ?
i.e.
--- configure.in        2004-04-27 19:44:33.000000000 +0100
+++ configure.in.new    2004-06-08 13:48:25.000000000 +0100
@@ -2795,7 +2795,7 @@
 #ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
-],statfs,f_favail)
+],statvfs,f_favail)
  
 AC_CHECK_STRUCT_FOR([
 #if HAVE_NLIST_H


And doesn't the same hold true for STRUCT_STATFS_HAS_F_FFREE?
Shouldn't that be looking in "struct statvfs" too?


> For unknown reasons, the MIB objects that this module implements
> do not appear in "snmpwalk" output.

Is this on your FreeBSD box(es), or something else?
Does this system have fields "f_ffree" and/or "f_favail" in either of
these two data structures?


Dave



-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to