[PATCH] blspec: support higher verbosity levels for boot

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Mar 8 05:04:16 PST 2023


bootm_data::verbose is an integer and may take values higher than one
for higher levels of verbosity. Yet, boots with blspec always had at
most a verbosity of one, because verbose was treated as boolean. Fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/blspec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/blspec.c b/common/blspec.c
index f6e590b2efd8..97400b9a2248 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -88,7 +88,7 @@ static int blspec_boot(struct bootentry *be, int verbose, int dryrun)
 
 	bootm_data_init_defaults(&data);
 
-	data.verbose = verbose || data.verbose;
+	data.verbose = max(verbose, data.verbose);
 
 	devicetree = blspec_entry_var_get(entry, "devicetree");
 	initrd = blspec_entry_var_get(entry, "initrd");
-- 
2.30.2




More information about the barebox mailing list