FreeBSD/sys/dev/ofw/ofw_standard.c
/* Open an instance for a device. */
Open an instance for a device.
Open an instance for a device .
static ihandle_t
ofw_std_open(ofw_t ofw, const char *device)
{
	struct {
		cell_t name;
		cell_t nargs;
		cell_t nreturns;
		cell_t device;
		cell_t instance;
	} args = {
		(cell_t)"open",
		1,
		1,
	};
	args.device = (cell_t)device;
	if (openfirmware(&args) == -1 || args.instance == 0)
		return (-1);
	return (args.instance);
}
static ihandle_t ofw_std_open ( ofw_t ofw , const char * device ) { struct { cell_t name ; cell_t nargs ; cell_t nreturns ; cell_t device ; cell_t instance ; } args = { ( cell_t ) " " , 1 , 1 , } ; args . device = ( cell_t ) device ; if ( openfirmware ( & args ) == -1 || args . instance == 0 ) return ( -1 ) ; return ( args . instance ) ; }
Open an instance for a device.
Open an instance for a device .