From 5bb5bedd347dee5d3928d71e568405b2d449f02d Mon Sep 17 00:00:00 2001 From: Herve Codina Date: Tue, 10 Feb 2026 18:33:31 +0100 Subject: [PATCH] fdtdump: Return an error code on wrong tag value 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 Message-ID: <20260210173349.636766-4-herve.codina@bootlin.com> Signed-off-by: David Gibson --- 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); } }