[PATCH v1] startup: allow to abort dryrun just before starting the OS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The dryrun in this function is used two times:
- with "Would run %s\n" and return
- to store dryrun for later use

The second one makes no sense since the first one will abort execution.
Since it is needed for debugging any way, it is better to allow to abort
later, just before starting the OS.

Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
 common/boot.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/boot.c b/common/boot.c
index f546fce62c..8969ca51ad 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -87,10 +87,8 @@ static int bootscript_boot(struct bootentry *entry, int verbose, int dryrun)
 
 	struct bootm_data data = {};
 
-	if (dryrun) {
-		printf("Would run %s\n", bs->scriptpath);
-		return 0;
-	}
+	if (verbose)
+		printf("Run %s\n", bs->scriptpath);
 
 	globalvar_add_simple("linux.bootargs.dyn.ip", NULL);
 	globalvar_add_simple("linux.bootargs.dyn.root", NULL);
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux