From 0d851d49c5299975168b3187d90530008c47d958 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Sun, 18 Mar 2018 00:12:12 +1100 Subject: libfdt: Add fdt_check_full() function This new function implements a complete and thorough check of an fdt blob's structure. Given a buffer containing an fdt, it should return 0 only if the fdt within is structurally sound in all regards. It doesn't check anything about the blob's contents (i.e. the actual values of the nodes and properties), of course. Signed-off-by: David Gibson Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy Reviewed-by: Simon Glass --- cpukit/include/libfdt.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cpukit/include/libfdt.h') diff --git a/cpukit/include/libfdt.h b/cpukit/include/libfdt.h index b81d046e54..79e4d82619 100644 --- a/cpukit/include/libfdt.h +++ b/cpukit/include/libfdt.h @@ -298,6 +298,8 @@ int fdt_move(const void *fdt, void *buf, int bufsize); /* Read-only functions */ /**********************************************************************/ +int fdt_check_full(const void *fdt, size_t bufsize); + /** * fdt_get_string - retrieve a string from the strings block of a device tree * @fdt: pointer to the device tree blob -- cgit v1.2.3