The dryrun field set in the static initializer is immediately overwritten in bootm_data_init_defaults(), so the dryrun parameter ends up without effect. Set it after calling bootm_data_init_defaults().
Fixes: 491a885e721e ("bootm: make dryrun controllable via global variable") Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de> --- common/blspec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/blspec.c b/common/blspec.c index 1cbadf8963..c35f2b670e 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -77,11 +77,10 @@ static int blspec_boot(struct bootentry *be, int verbose, int dryrun) const char *overlays; const char *appendroot; char *old_fws, *fws; - struct bootm_data data = { - .dryrun = dryrun, - }; + struct bootm_data data = {}; bootm_data_init_defaults(&data); + data.dryrun = max(dryrun, data.dryrun); data.os_file = data.oftree_file = data.initrd_file = NULL; data.verbose = max(verbose, data.verbose); -- 2.39.5