FreeBSD/sys/boot/ofw/libofw/openfirm.c
/* Open an instance for a device. */
Open an instance for a device.
Open an instance for a device .
ihandle_t
OF_open(char *device)
{
	static 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);
}
ihandle_t OF_open ( char * device ) { static 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 .