Lines Matching defs:package
353 /* Return the package handle that corresponds to an instance handle. */
364 /* Get the length of a property of a package. */
366 OF_getproplen(phandle_t package, const char *propname)
372 return (OFW_GETPROPLEN(ofw_obj, package, propname));
375 /* Check existence of a property of a package. */
377 OF_hasprop(phandle_t package, const char *propname)
380 return (OF_getproplen(package, propname) >= 0 ? 1 : 0);
383 /* Get the value of a property of a package. */
385 OF_getprop(phandle_t package, const char *propname, void *buf, size_t buflen)
391 return (OFW_GETPROP(ofw_obj, package, propname, buf, buflen));
440 * Store the value of a property of a package into newly allocated memory
444 OF_getprop_alloc(phandle_t package, const char *propname, void **buf)
449 if ((len = OF_getproplen(package, propname)) == -1)
454 if (OF_getprop(package, propname, *buf, len) == -1) {
464 * Store the value of a property of a package into newly allocated memory
469 OF_getprop_alloc_multi(phandle_t package, const char *propname, int elsz, void **buf)
474 if ((len = OF_getproplen(package, propname)) == -1 ||
480 if (OF_getprop(package, propname, *buf, len) == -1) {
490 OF_getencprop_alloc(phandle_t package, const char *name, void **buf)
494 ret = OF_getencprop_alloc_multi(package, name, sizeof(pcell_t),
503 OF_getencprop_alloc_multi(phandle_t package, const char *name, int elsz,
510 retval = OF_getprop_alloc_multi(package, name, elsz, buf);
528 /* Get the next property of a package. */
530 OF_nextprop(phandle_t package, const char *previous, char *buf, size_t size)
536 return (OFW_NEXTPROP(ofw_obj, package, previous, buf, size));
539 /* Set the value of a property of a package. */
541 OF_setprop(phandle_t package, const char *propname, const void *buf, size_t len)
547 return (OFW_SETPROP(ofw_obj, package, propname, buf,len));
561 /* Return a package handle for the specified device. */
583 /* Return the fully qualified pathname corresponding to a package. */
585 OF_package_to_path(phandle_t package, char *buf, size_t len)
591 return (OFW_PACKAGE_TO_PATH(ofw_obj, package, buf, len));