Add support for DragonFly BSD 1.0. Also a minor tweak to the network interface code to make it more portable.
There's no need to get_uvmexp on startup on NetBSD any more.
kvm is now only needed for FreeBSD, so change defines accordingly.
Use sysctl to read struct uvmexp, since this works on both NetBSD and OpenBSD.
Added extra ifdef due to compile error
Ooops, wrong logic and didn't think hard enough about it.
Solaris 6 doesn't have libdevinfo. So, as a way to get it to compile, we will not do the drive mappings sol 6 and lower.
A whole bunch of minor cosmetic changes.
Alter the licensing of libstatgrab. The library part is now under the LGPL, whilst the tools/examples are under the GPL. Both licenses are included in the distribution (and are both now in CVS). Also made a minor alteration to the webpage where it said everything was licensed under the GPL.
Not the exactly "nice" code. Infact, not entirely happy with it... But, it makes a *massive* speed increase to the statgrab_init() function on solaris. It goes from take 15-20 seconds on pelican to < 1.
Fix broken comment.
Solaris 7 "fix" :)
Added strlcat/strlcpy (taken from openssh). Added a #define for both, and also atoll which we appear to of forgotten about when it was written. Removed that #ifdef around get_ll_match as atoll will now always be defined.
Replace duplicated code for dropping privileges with a library function that always drops setuid/setgid privileges.
Minor tiding
Turn on the solaris disk mapping code. Fix some minor bugs, and remove some debugging code.
Die nasty incorrect whitespace. Ahem. Excuse me.
Basic implementation of name mapping for solaris. The code is ugly, mostly because its initially taken from a sun example, and modified. It needs tiding somewhat. I'm not sure if tools.c is the right place for this, i guess it could go in disk_stats.c, but its doing a specific job, and we could right another mini-program which does the disk mappings. Comments welcome about the general implementation. Should we call build_mapping if the user calls get_svr_from_bsd and build_mapping hasn't been run before? Or should we force them to use the init function? (Bare in mind, on some systems, to do the mappings correctly the program will require to be root. (Only ones with a /dev/osa , so everything with an A1000 for e.g.)
Provide atoll() on platforms that don't have it.
Add support for cygwin. This is a bit limited, there's a few things that can't be retrieved on cygwin such as load averages, diskio, network io, and process stats. The package compiles and runs, and both saidar and statgrab work. Taken from a patch submitted by Ron Arts <raarts@netland.nl>. Thanks Ron!
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.