The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2af5ce5b5efb0cf6514acdc4a8b4058221641c39
commit 2af5ce5b5efb0cf6514acdc4a8b4058221641c39 Author: Zhenlei Huang <z...@freebsd.org> AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang <z...@freebsd.org> CommitDate: 2023-10-09 10:30:21 +0000 fd: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. kern.maxfiles 2. kern.maxfilesperproc No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/kern/kern_descrip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 35046c856d54..6ed824e229d6 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -5090,10 +5090,11 @@ DB_SHOW_COMMAND_FLAGS(files, db_show_files, DB_CMD_MEMSAFE) } #endif -SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, + CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfilesperproc, 0, "Maximum files allowed open per process"); -SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfiles, 0, "Maximum number of files"); SYSCTL_INT(_kern, OID_AUTO, openfiles, CTLFLAG_RD,