[RFC PATCH 03/15] fdtdump: Return an error code on wrong tag value
Herve Codina <[email protected]> Tue, 10 Feb 2026 18:33:31 +0100
| Newsgroups | org.kernel.vger.devicetree-spec,org.kernel.vger.devicetree-compiler,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
fdtdump prints a message on stderr when it encounters a wrong tag and stop its processing without returning an error code. Having a wrong tag is really a failure. Indeed, the processing cannot continue. Be more strict. Stop the processing, print a message and return an error code. In other words, call die(). Signed-off-by: Herve Codina <[email protected]> --- fdtdump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fdtdump.c b/fdtdump.c index 6c9ad90..0e7a265 100644 --- a/fdtdump.c +++ b/fdtdump.c @@ -146,8 +146,7 @@ static void dump_blob(void *blob, bool debug) continue; } - fprintf(stderr, "%*s ** Unknown tag 0x%08"PRIx32"\n", depth * shift, "", tag); - break; + die("** Unknown tag 0x%08"PRIx32"\n", tag); } } -- 2.52.0