diff options
author | Mark Johnston <markj@FreeBSD.org> | 2016-12-06 22:52:45 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2016-12-06 22:52:45 +0000 |
commit | 77edd8fa0008def2217b1adf5106b68296a713b4 (patch) | |
tree | d407b96c2a45dec8e875626163d0e5e9a26f8ac4 /sys/vm/vm_meter.c | |
parent | 10c480e7759651a117696281ce8f99f4fb823100 (diff) | |
download | src-77edd8fa0008def2217b1adf5106b68296a713b4.tar.gz src-77edd8fa0008def2217b1adf5106b68296a713b4.zip |
Provide dummy sysctls for v_cache_count and v_tcached.
Some utilities (notably top(1)) exit if any of their input sysctls don't
exist, and the removal of the above-mentioned PG_CACHE-related sysctls
makes it difficult to run such utilities on different versions of the
kernel without recompiling.
Requested by: bde
Notes
Notes:
svn path=/head/; revision=309658
Diffstat (limited to 'sys/vm/vm_meter.c')
-rw-r--r-- | sys/vm/vm_meter.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 2ea5cdad520a..2b8a5d7fd8f3 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -314,3 +314,14 @@ VM_STATS_VM(v_forkpages, "VM pages affected by fork()"); VM_STATS_VM(v_vforkpages, "VM pages affected by vfork()"); VM_STATS_VM(v_rforkpages, "VM pages affected by rfork()"); VM_STATS_VM(v_kthreadpages, "VM pages affected by fork() by kernel"); + +#ifndef BURN_BRIDGES +/* + * Provide compatibility sysctls for the benefit of old utilities which exit + * with an error if they cannot be found. + */ +SYSCTL_UINT(_vm_stats_vm, OID_AUTO, v_cache_count, CTLFLAG_RD, + (u_int *)NULL, 0, "Dummy for compatibility"); +SYSCTL_UINT(_vm_stats_vm, OID_AUTO, v_tcached, CTLFLAG_RD, + (u_int *)NULL, 0, "Dummy for compatibility"); +#endif |