sys/kern/subr_bus.c
/*
 * User-space access to the device tree.
 *
 * We implement a small set of nodes:
 *
 * hw.bus			Single integer read method to obtain the
 *				current generation count.
 * hw.bus.devices		Reads the entire device tree in flat space.
 * hw.bus.rman			Resource manager interface
 *
 * We might like to add the ability to scan devclasses and/or drivers to
 * determine what else is currently loaded/available.
 */
User-space access to the device tree.
We implement a small set of nodes.

hw.bus                       Single integer read method to obtain the
current generation count.
hw.bus.devices               Reads the entire device tree in flat space.

We might like to add the ability to scan devclasses and/or drivers to
determine what else is currently loaded/available.
User - space access to the device tree . We implement a small set of nodes . hw . bus Single integer read method to obtain the current generation count . hw . bus . devices Reads the entire device tree in flat space . We might like to add the ability to scan devclasses and / or drivers to determine what else is currently loaded / available .
static int
sysctl_bus(SYSCTL_HANDLER_ARGS)
{
	struct u_businfo	ubus;
	ubus.ub_version = BUS_USER_VERSION;
	ubus.ub_generation = bus_data_generation;
	return (SYSCTL_OUT(req, &ubus, sizeof(ubus)));
}
static int sysctl_bus ( SYSCTL_HANDLER_ARGS ) { struct u_businfo ubus ; ubus . ub_version = BUS_USER_VERSION ; ubus . ub_generation = bus_data_generation ; return ( SYSCTL_OUT ( req , & ubus , sizeof ( ubus ) ) ) ; }
User-space access to the device tree.
User - space access to the device tree .