mirror of
https://github.com/dgibson/dtc.git
synced 2026-07-10 13:29:48 -04:00
libfdt: fdt_check_full: Add can_assume(PERFECT) check
Some checks are pending
Build test / build-linux (make, alpine) (push) Waiting to run
Build test / build-linux (make, archlinux) (push) Waiting to run
Build test / build-linux (make, fedora) (push) Waiting to run
Build test / build-linux (make, ubuntu) (push) Waiting to run
Build test / build-linux (meson, alpine) (push) Waiting to run
Build test / build-linux (meson, archlinux) (push) Waiting to run
Build test / build-linux (meson, fedora) (push) Waiting to run
Build test / build-linux (meson, ubuntu) (push) Waiting to run
Build test / build-macos (make) (push) Waiting to run
Build test / build-macos (meson) (push) Waiting to run
Build test / mingw32 (push) Waiting to run
Build test / clang64 (push) Waiting to run
Build test / mingw64 (push) Waiting to run
Build test / ucrt64 (push) Waiting to run
Build test / FreeBSD 13.5 make build (push) Waiting to run
Build test / FreeBSD 14.3 make build (push) Waiting to run
Build test / FreeBSD 13.5 meson build (push) Waiting to run
Build test / FreeBSD 14.3 meson build (push) Waiting to run
Some checks are pending
Build test / build-linux (make, alpine) (push) Waiting to run
Build test / build-linux (make, archlinux) (push) Waiting to run
Build test / build-linux (make, fedora) (push) Waiting to run
Build test / build-linux (make, ubuntu) (push) Waiting to run
Build test / build-linux (meson, alpine) (push) Waiting to run
Build test / build-linux (meson, archlinux) (push) Waiting to run
Build test / build-linux (meson, fedora) (push) Waiting to run
Build test / build-linux (meson, ubuntu) (push) Waiting to run
Build test / build-macos (make) (push) Waiting to run
Build test / build-macos (meson) (push) Waiting to run
Build test / mingw32 (push) Waiting to run
Build test / clang64 (push) Waiting to run
Build test / mingw64 (push) Waiting to run
Build test / ucrt64 (push) Waiting to run
Build test / FreeBSD 13.5 make build (push) Waiting to run
Build test / FreeBSD 14.3 make build (push) Waiting to run
Build test / FreeBSD 13.5 meson build (push) Waiting to run
Build test / FreeBSD 14.3 meson build (push) Waiting to run
In this function from fdt_check.c we have (reasonably and as the name implies) a number of checks on the DTB. However, there are cases where we may wish to assume that we have been given a perfect DTB already and do nothing here. Add a test for can_assume(PERFECT) as the first check in this function and if true, perform no checks. Signed-off-by: Tom Rini <trini@konsulko.com> Message-ID: <20260526203022.4006434-1-trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
214372a273
commit
66e1201c37
1 changed files with 2 additions and 0 deletions
|
|
@ -21,6 +21,8 @@ int fdt_check_full(const void *fdt, size_t bufsize)
|
|||
const char *propname;
|
||||
bool expect_end = false;
|
||||
|
||||
if (can_assume(PERFECT))
|
||||
return 0;
|
||||
if (bufsize < FDT_V1_SIZE)
|
||||
return -FDT_ERR_TRUNCATED;
|
||||
if (bufsize < fdt_header_size(fdt))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue