FreeBSD/sys/dev/ofw/ofw_standard.c
/* Return the package handle that corresponds to an instance handle. */
Return the package handle that corresponds to an instance handle.
Return the package handle that corresponds to an instance handle .
static phandle_t
ofw_std_instance_to_package(ofw_t ofw, ihandle_t instance)
{
	struct {
		cell_t name;
		cell_t nargs;
		cell_t nreturns;
		cell_t instance;
		cell_t package;
	} args = {
		(cell_t)"instance-to-package",
		1,
		1,
	};
	args.instance = instance;
	if (openfirmware(&args) == -1)
		return (-1);
	return (args.package);
}
static phandle_t ofw_std_instance_to_package ( ofw_t ofw , ihandle_t instance ) { struct { cell_t name ; cell_t nargs ; cell_t nreturns ; cell_t instance ; cell_t package ; } args = { ( cell_t ) " " , 1 , 1 , } ; args . instance = instance ; if ( openfirmware ( & args ) == -1 ) return ( -1 ) ; return ( args . package ) ; }
Return the package handle that corresponds to an instance handle.
Return the package handle that corresponds to an instance handle .