Provide kern.maxphys sysctl, which returns MAXPHYS. Naming matches NetBSD.

This commit is contained in:
Gleb Smirnoff 2016-09-29 23:07:28 +00:00
parent 1a9be618db
commit 7ed6b78b92
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306462
2 changed files with 4 additions and 0 deletions

View File

@ -138,6 +138,9 @@ char kernelname[MAXPATHLEN] = "/kernel"; /* XXX bloat */
SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW,
kernelname, sizeof kernelname, "Name of kernel file booted");
SYSCTL_INT(_kern, KERN_MAXPHYS, maxphys, CTLFLAG_RD | CTLFLAG_CAPRD,
SYSCTL_NULL_INT_PTR, MAXPHYS, "Maximum block I/O access size");
SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD,
&mp_ncpus, 0, "Number of active CPUs");

View File

@ -835,6 +835,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
#define KERN_IOV_MAX 35 /* int: value of UIO_MAXIOV */
#define KERN_HOSTUUID 36 /* string: host UUID identifier */
#define KERN_ARND 37 /* int: from arc4rand() */
#define KERN_MAXPHYS 38 /* int: MAXPHYS value */
/*
* KERN_PROC subtypes
*/