Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ofw/openfirm.c
Show First 20 Lines • Show All 471 Lines • ▼ Show 20 Lines | OF_getencprop_alloc(phandle_t package, const char *name, int elsz, void **buf) | ||||
cell = *buf; | cell = *buf; | ||||
for (i = 0; i < retval * elsz / 4; i++) | for (i = 0; i < retval * elsz / 4; i++) | ||||
cell[i] = be32toh(cell[i]); | cell[i] = be32toh(cell[i]); | ||||
return (retval); | return (retval); | ||||
} | } | ||||
/* Free buffer allocated by OF_getencprop_alloc or OF_getprop_alloc */ | |||||
void OF_prop_free(void *buf) | |||||
{ | |||||
free(buf, M_OFWPROP); | |||||
} | |||||
/* Get the next property of a package. */ | /* Get the next property of a package. */ | ||||
int | int | ||||
OF_nextprop(phandle_t package, const char *previous, char *buf, size_t size) | OF_nextprop(phandle_t package, const char *previous, char *buf, size_t size) | ||||
{ | { | ||||
if (ofw_def_impl == NULL) | if (ofw_def_impl == NULL) | ||||
return (-1); | return (-1); | ||||
▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines |