FreeBSD/sys/boot/ofw/libofw/openfirm.c
/* Convert a device specifier to a fully qualified pathname. */
Convert a device specifier to a fully qualified pathname.
Convert a device specifier to a fully qualified pathname .
int
OF_canon(const char *device, char *buf, int len)
{
	static struct {
		cell_t name;
		cell_t nargs;
		cell_t nreturns;
		cell_t device;
		cell_t buf;
		cell_t len;
		cell_t size;
	} args = {
		(cell_t)"canon",
		3,
		1,
	};
	args.device = (cell_t)device;
	args.buf = (cell_t)buf;
	args.len = len;
	if (openfirmware(&args) == -1)
		return (-1);
	return (args.size);
}
int OF_canon ( const char * device , char * buf , int len ) { static struct { cell_t name ; cell_t nargs ; cell_t nreturns ; cell_t device ; cell_t buf ; cell_t len ; cell_t size ; } args = { ( cell_t ) " " , 3 , 1 , } ; args . device = ( cell_t ) device ; args . buf = ( cell_t ) buf ; args . len = len ; if ( openfirmware ( & args ) == -1 ) return ( -1 ) ; return ( args . size ) ; }
Convert a device specifier to a fully qualified pathname.
Convert a device specifier to a fully qualified pathname .