mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-09 13:15:18 -05:00
libfdt: More thorough use of constification
As a read-only functions, which take a const pointer to the fdt, treat fdt_get_property() and fdt_getprop() as returning const pointers to within the blob. fdt_get_property_w() and fdt_getprop_w() versions are supplied which take a non-const fdt pointer and return a non-const pointer for the benefit of callers wishing to alter the device tree contents. Likewise the lower-level fdt_offset_ptr() and _fdt_offset_ptr() functions are changed to return const pointers, with *_w() versions supplied. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
857f54e79f
commit
a6c76f923d
15 changed files with 70 additions and 43 deletions
|
|
@ -32,7 +32,7 @@
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
void *fdt = &_truncated_property;
|
||||
void *prop;
|
||||
const void *prop;
|
||||
int err;
|
||||
int len;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue