diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-15 09:05:37 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-26 22:45:36 +0100 |
commit | 3f0835e0741c80305faf638aaf174ac9d235e83e (patch) | |
tree | 1e8febe8e4c5b09ab34c05ecbce1fdbb34098edd /arch/mips | |
parent | 80f6d5db3041f2ae1109f3f811cf48e4f25142e4 (diff) | |
download | barebox-3f0835e0741c80305faf638aaf174ac9d235e83e.tar.gz barebox-3f0835e0741c80305faf638aaf174ac9d235e83e.tar.xz |
bootm: Push dryrun to handlers
We can make the dryrun option more useful by calling into the handlers.
With this we can detect more cases that can go wrong during boot.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/lib/bootm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 84f72f5ac0..6702372333 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -1,6 +1,7 @@ #include <boot.h> #include <common.h> #include <libfile.h> +#include <malloc.h> #include <init.h> #include <fs.h> #include <errno.h> @@ -17,6 +18,11 @@ static int do_bootm_barebox(struct image_data *data) if (!barebox) return -EINVAL; + if (data->dryrun) { + free(barebox); + return 0; + } + shutdown_barebox(); barebox(); |