diff options
author | Thomas Moestl <tmm@FreeBSD.org> | 2001-11-18 20:38:44 +0000 |
---|---|---|
committer | Thomas Moestl <tmm@FreeBSD.org> | 2001-11-18 20:38:44 +0000 |
commit | 398e05ab1ccf6fe9c21426b0627e0570656dde93 (patch) | |
tree | f5fd72ad640b097477c78af41a09eb2e4caedfac /sys/dev/ofw/openfirm.h | |
parent | 656ad29399a3a53d43acae98e609cc9f9e2d3d95 (diff) | |
download | src-398e05ab1ccf6fe9c21426b0627e0570656dde93.tar.gz src-398e05ab1ccf6fe9c21426b0627e0570656dde93.zip |
1. Add ofw_pci.h with definitions for the OpenFirmware PCI bindings
2. Add OF_getprop_alloc(), a helper function that will malloc() a sufficient
amount of memory and then retrieve a property value into it.
Approved by: benno
Obtained from: NetBSD (1)
Notes
Notes:
svn path=/head/; revision=86557
Diffstat (limited to 'sys/dev/ofw/openfirm.h')
-rw-r--r-- | sys/dev/ofw/openfirm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index d3760a97294b..f02a42c9982b 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -66,6 +66,9 @@ #include <sys/cdefs.h> #include <sys/types.h> +#include <sys/malloc.h> + +MALLOC_DECLARE(M_OFWPROP); typedef unsigned long cell_t; @@ -96,6 +99,8 @@ phandle_t OF_parent(phandle_t); phandle_t OF_instance_to_package(ihandle_t); int OF_getproplen(phandle_t, char *); int OF_getprop(phandle_t, char *, void *, int); +int OF_getprop_alloc(phandle_t package, char *propname, int elsz, + void **buf); int OF_nextprop(phandle_t, char *, char *); int OF_setprop(phandle_t, char *, void *, int); int OF_canon(const char *, char *, int); |