git: b5ecbcd26cc3 - main - vmstat: Drop vm_cnt compat hack
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Sep 2026 12:50:09 UTC
The branch main has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=b5ecbcd26cc3a80831c7ff38433dc5f9c3ced575
commit b5ecbcd26cc3a80831c7ff38433dc5f9c3ced575
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-09-01 12:49:57 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-09-01 12:49:57 +0000
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
---
usr.bin/vmstat/vmstat.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index d8d33cb3a3a5..24421b8e9ca7 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -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.