Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_devstat.c
Show All 12 Lines | |||||
/* | /* | ||||
* Sysctl entries for devstat. The first one is a node that all the rest | * Sysctl entries for devstat. The first one is a node that all the rest | ||||
* hang off of. | * hang off of. | ||||
*/ | */ | ||||
static SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, NULL, | static SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, NULL, | ||||
"Device Statistics"); | "Device Statistics"); | ||||
SYSCTL_PROC(_kern_devstat, OID_AUTO, all, CTLFLAG_RD|CTLTYPE_OPAQUE, | SYSCTL_PROC(_kern_devstat, OID_AUTO, all, | ||||
NULL, 0, sysctl_devstat, "S,devstat", "All devices in the devstat list"); | CTLFLAG_RD | CTLTYPE_OPAQUE | CTLFLAG_NEEDGIANT, | ||||
NULL, 0, sysctl_devstat, "S,devstat", | |||||
"All devices in the devstat list"); | |||||
/* | /* | ||||
* Export the number of devices in the system so that userland utilities | * Export the number of devices in the system so that userland utilities | ||||
* can determine how much memory to allocate to hold all the devices. | * can determine how much memory to allocate to hold all the devices. | ||||
*/ | */ | ||||
SYSCTL_INT(_kern_devstat, OID_AUTO, numdevs, CTLFLAG_RD, | SYSCTL_INT(_kern_devstat, OID_AUTO, numdevs, CTLFLAG_RD, | ||||
&devstat_num_devs, 0, "Number of devices in the devstat list"); | &devstat_num_devs, 0, "Number of devices in the devstat list"); | ||||
SYSCTL_LONG(_kern_devstat, OID_AUTO, generation, CTLFLAG_RD, | SYSCTL_LONG(_kern_devstat, OID_AUTO, generation, CTLFLAG_RD, | ||||
&devstat_generation, 0, "Devstat list generation"); | &devstat_generation, 0, "Devstat list generation"); | ||||
Show All 12 Lines |