]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
fdt: Add a function to remove unused strings from a device tree
authorSimon Glass <sjg@chromium.org>
Tue, 23 Jun 2015 21:38:26 +0000 (15:38 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:34:25 +0000 (13:34 +0200)
commit782abf42d6bbd7c98a97a231516a826ef20d6742
treef79596f1929e06060f8592c9ce9ad182f2ea1ca3
parent1b84367db2d8551dc2db4bc003887ca87709b4b3
fdt: Add a function to remove unused strings from a device tree

Property names are stored in a string table. When a node property is
removed, the string table is not updated since other nodes may have a
property with the same name.

Thus it is possible for the string table to build up a number of unused
strings. Add a function to remove these. This works by building a new device
tree from the old one, adding strings one by one as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/libfdt.h
lib/libfdt/fdt_rw.c