K 10 svn:author V 7 rwatson K 8 svn:date V 27 2001-02-23T18:49:16.000000Z K 7 svn:log V 702 Adapt libkvm_getswapinfo() to make use of recently committed vm and swap sysctls exporting swap information. When running on a live kernel, the sysctl's will now be used instead of kvm_read, allowing consumers of this interface to run without privilege (setgid kmem). Retain the ability to run on coredumps, or on a kernel using kmem if explicitly pointed at one. A side effect of this change is that kvm_getswapinfo() is faster now in the general case. If the SWIF_DUMP_TREE flag is given (pstat -ss does this), the radix tree walker, which still uses kvm_read in any case, is invoked, and therefore does require privilege. Submitted by: Thomas Moestl Reviewed by: freebsd-audit END