summaryrefslogtreecommitdiffstats
path: root/cpukit/dtc/libfdt/fdt_strerror.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-05-09 19:41:21 +1000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-02 07:52:20 +0100
commitadb403b94a71e0c556a9455515e5072138ee138d (patch)
tree2278b79d96f8bcf5575c7755dcb27756f8e3d7f3 /cpukit/dtc/libfdt/fdt_strerror.c
parentlibfdt: Ensure fdt_add_property frees allocated name string on failure (diff)
downloadrtems-adb403b94a71e0c556a9455515e5072138ee138d.tar.bz2
libfdt: Introduce fdt_create_with_flags()
There is a need to be able to specify some options when building an FDT with the SW interface. This can be accomplished with minimal changes by storing intermediate data in the fdt header itself, in fields that are not otherwise needed during the creation process and can be set by fdt_finish(). The fdt.magic field is already used exactly this way, as a state to check with callers that the FDT has been created but not yet finished. fdt.version and fdt.last_comp_version are used to make room for more intermediate state. These are adjacent and unused during the building process. last_comp_version is not yet used for intermediate state, but it is zeroed and treated as used, so as to allow future growth easily. A new interface, fdt_create_with_flags() is added, which takes 32-bit flag value to control creation. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20190509094122.834-3-npiggin@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'cpukit/dtc/libfdt/fdt_strerror.c')
-rw-r--r--cpukit/dtc/libfdt/fdt_strerror.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/dtc/libfdt/fdt_strerror.c b/cpukit/dtc/libfdt/fdt_strerror.c
index 9677a1887e..0e6b4fd5e7 100644
--- a/cpukit/dtc/libfdt/fdt_strerror.c
+++ b/cpukit/dtc/libfdt/fdt_strerror.c
@@ -82,6 +82,7 @@ static struct fdt_errtabent fdt_errtable[] = {
FDT_ERRTABENT(FDT_ERR_BADVALUE),
FDT_ERRTABENT(FDT_ERR_BADOVERLAY),
FDT_ERRTABENT(FDT_ERR_NOPHANDLES),
+ FDT_ERRTABENT(FDT_ERR_BADFLAGS),
};
#define FDT_ERRTABSIZE (sizeof(fdt_errtable) / sizeof(fdt_errtable[0]))