Changed the style slightly to be more readable.
Added statgrab_init() This function just calls the get_kvm type functions so all special privilages can be dropped after this function has been called. It currently only does stuff on *bsd (and needs testing on netbsd). All other OS's will just have a function that returns 0 Solaris at somepoint may need to do something here so we can do the drive mappings.
Initial support for NetBSD. This adds NetBSD support for everything except diskio stats (since they're even more disturbingly complex to get at on NetBSD than the three OSs we already support). Tested against NetBSD 1.6 on i386.
Add a helper function for opening the kvm handle. This removes a little bit of duplicated code, and means that we don't open and close kvm (which can potentially be quite expensive) each time we use it. This will also be useful for NetBSD.
Remove headers from tools.h that the prototypes don't need (since they're included elsewhere where needed). Include tools.h in tools.c, so we get warnings if the prototypes are wrong.
Tidy up of lots of little things. :)
Add the standard header. Particularly the bit about including config.h was needed to allow the ifdef around the last function to work.
Make the functions that use atoll have a #ifdef HAVE_ATOLL around them. I did this because freebsd doesn't have this function, and it doesn't need to run any of the functions in tools.h that uses them.
Made network stats work with linux.
Working linux diskio stats. Fixed bug in tools.c
Useful tools, currently only one function. Function takes a file pointer and will read threw it until it hits a passed string. It will return that line.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.