diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-11-01 11:37:31 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-11-01 08:03:31 -0500 |
commit | a041dcdc48453f26b76bccdb5e2a1ebb3a0ea987 (patch) | |
tree | 64ddc9db11c33e861a5863513070d3ecfb935b69 /tests/del_property.c | |
parent | 4a5df5c026c96f36326d4037a0658d38193e2ca1 (diff) | |
download | dtc-a041dcdc48453f26b76bccdb5e2a1ebb3a0ea987.zip dtc-a041dcdc48453f26b76bccdb5e2a1ebb3a0ea987.tar.gz dtc-a041dcdc48453f26b76bccdb5e2a1ebb3a0ea987.tar.bz2 |
libfdt: Handle v16 and re-ordered trees for r/w
Currently all the read/write functions in libfdt require that the
given tree be v17, and further, that the tree has the memory
reservation block, structure block and strings block stored in that
physical order.
This patch eases these constraints, by making fdt_open_int() reorder
the blocks, and/or convert the tree to v17, so that it will then be
ready for the other read-write functions.
It also extends fdt_pack() to actually remove any gaps between blocks
that might be present.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/del_property.c')
-rw-r--r-- | tests/del_property.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/del_property.c b/tests/del_property.c index 35dc932..2c412c3 100644 --- a/tests/del_property.c +++ b/tests/del_property.c @@ -41,6 +41,8 @@ int main(int argc, char *argv[]) test_init(argc, argv); fdt = load_blob_arg(argc, argv); + fdt = open_blob_rw(fdt); + oldsize = fdt_totalsize(fdt); intp = check_getprop_typed(fdt, 0, "prop-int", TEST_VALUE_1); |