FreeBSD/sys/boot/ofw/libofw/openfirm.c
/* Return the fully qualified pathname corresponding to an instance. */
Return the fully qualified pathname corresponding to an instance.
Return the fully qualified pathname corresponding to an instance .
int
OF_instance_to_path(ihandle_t instance, char *buf, int len)
{
	static struct {
		cell_t name;
		cell_t nargs;
		cell_t nreturns;
		cell_t instance;
		cell_t buf;
		cell_t len;
		cell_t size;
	} args = {
		(cell_t)"instance-to-path",
		3,
		1,
	};
	args.instance = instance;
	args.buf = (cell_t)buf;
	args.len = len;
	if (openfirmware(&args) == -1)
		return (-1);
	return (args.size);
}
int OF_instance_to_path ( ihandle_t instance , char * buf , int len ) { static struct { cell_t name ; cell_t nargs ; cell_t nreturns ; cell_t instance ; cell_t buf ; cell_t len ; cell_t size ; } args = { ( cell_t ) " " , 3 , 1 , } ; args . instance = instance ; args . buf = ( cell_t ) buf ; args . len = len ; if ( openfirmware ( & args ) == -1 ) return ( -1 ) ; return ( args . size ) ; }
Return the fully qualified pathname corresponding to an instance.
Return the fully qualified pathname corresponding to an instance .