FreeBSD/sys/boot/ofw/libofw/openfirm.c
/* Set the value of a property of a package. */
/* XXX Has a bug on FirePower */
Set the value of a property of a package.
XXX Has a bug on FirePower
Set the value of a property of a package . XXX Has a bug on FirePower
int
OF_setprop(phandle_t package, char *propname, void *buf, int len)
{
	static struct {
		cell_t name;
		cell_t nargs;
		cell_t nreturns;
		cell_t package;
		cell_t propname;
		cell_t buf;
		cell_t len;
		cell_t size;
	} args = {
		(cell_t)"setprop",
		4,
		1,
	};
	args.package = package;
	args.propname = (cell_t)propname;
	args.buf = (cell_t)buf;
	args.len = len;
	if (openfirmware(&args) == -1)
		return (-1);
	return (args.size);
}
int OF_setprop ( phandle_t package , char * propname , void * buf , int len ) { static struct { cell_t name ; cell_t nargs ; cell_t nreturns ; cell_t package ; cell_t propname ; cell_t buf ; cell_t len ; cell_t size ; } args = { ( cell_t ) " " , 4 , 1 , } ; args . package = package ; args . propname = ( cell_t ) propname ; args . buf = ( cell_t ) buf ; args . len = len ; if ( openfirmware ( & args ) == -1 ) return ( -1 ) ; return ( args . size ) ; }
Set the value of a property of a package.
Set the value of a property of a package .