Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libkvm: Fix kvm_getloadavg() on modern kernel vmcores
Fix kvm_getloadavg() to work correctly on vmcores for modern kernel versions. The kernels no longer include the `_fscale` symbol causing the kvm_nlist() invocation to fail. The code seemed to already assume that `_fscale` could be missing but the early kvm_nlist() result check has caused the function to fail if any symbol were missing. Modify it to only treat `_averunnable` as obligatory, and handle missing `_fscale` gracefully. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32884
- Loading branch information