summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-06-29 09:08:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-06-29 09:11:16 +0200
commitd7fc1c18e785277f24a69e2aaa1a2c6e80e2b0cf (patch)
tree3cb5925f01693196d768f3925df8954bb2615e8c /commands
parenta7f955fc9868762550378fbcab70a38cb0b821fb (diff)
downloadbarebox-d7fc1c18e785277f24a69e2aaa1a2c6e80e2b0cf.tar.gz
barebox-d7fc1c18e785277f24a69e2aaa1a2c6e80e2b0cf.tar.xz
boot command: Make verbose/dryrun options work again
Fixes: bc94fb3 bootm: Initialize bootm_data defaults in single place bootm_data_init_defaults() must be called before filling in the values from the commandline options, otherwise the values will be overwritten in bootm_data_init_defaults(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/boot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/commands/boot.c b/commands/boot.c
index bd1be4ba75..c091b2e1fa 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -52,10 +52,13 @@ static int boot_script(char *path)
goto out;
}
- data.verbose = verbose;
- data.dryrun = dryrun;
bootm_data_init_defaults(&data);
+ if (verbose)
+ data.verbose = verbose;
+ if (dryrun)
+ data.dryrun = dryrun;
+
ret = bootm_boot(&data);
if (ret)
pr_err("Booting %s failed: %s\n", basename(path), strerror(-ret));