mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
vmstat: Drop vm_cnt compat hack
Prior to FreeBSD 11, vm_cnt was named cnt. When it was renamed, vmstat was modified to fall back to the old name if the new name was not found. It's time we dropped this. Reviewed by: kib, jhb, emaste Differential Revision: https://reviews.freebsd.org/D59255
This commit is contained in:
1 parent
cdfc673811
commit
b5ecbcd26c
1 file changed
-11
@@ -294,22 +294,11 @@ main(int argc, char *argv[])
|
||||
xo_errx(1, "kvm_openfiles: %s", errbuf);
|
||||
}
|
||||
|
||||
retry_nlist:
|
||||
if (kd != NULL && (c = kvm_nlist(kd, namelist)) != 0) {
|
||||
if (c > 0) {
|
||||
bufsize = 0;
|
||||
len = 0;
|
||||
|
||||
/*
|
||||
* 'cnt' was renamed to 'vm_cnt'. If 'vm_cnt' is not
|
||||
* found try looking up older 'cnt' symbol.
|
||||
* */
|
||||
if (namelist[X_SUM].n_type == 0 &&
|
||||
strcmp(namelist[X_SUM].n_name, "vm_cnt") == 0) {
|
||||
namelist[X_SUM].n_name = "cnt";
|
||||
goto retry_nlist;
|
||||
}
|
||||
|
||||
/*
|
||||
* 'nintrcnt' doesn't exist in older kernels, but
|
||||
* that isn't fatal.
|
||||
|
||||
Reference in new issue
Block a user