summaryrefslogtreecommitdiffstats
path: root/common/startup.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-08-22 08:54:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-30 09:26:07 +0200
commitd421771bcea063b9bce551e06552067b9074d015 (patch)
tree3d0ed37e1c43ff307820472b32baea73b9c0cc72 /common/startup.c
parent6a0cade746d86ea1caeadbf598f01641a0dc830a (diff)
downloadbarebox-d421771bcea063b9bce551e06552067b9074d015.tar.gz
startup: allow ctrl+c abort during boot sequence
At the moment e.g. a wait for an ARP response during net boot can only aborted if the auto boot countdown was aborted. Otherwise ctrl+c is without effect. For better user experience allow code querying for ctrl+c to see it even if barebox had not dropped into a shell. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/startup.c')
-rw-r--r--common/startup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/startup.c b/common/startup.c
index b5b86d1..c6e1199 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -314,11 +314,11 @@ static int run_init(void)
autoboot = do_autoboot_countdown();
+ console_ctrlc_allow();
+
if (autoboot == AUTOBOOT_BOOT)
run_command("boot");
- console_ctrlc_allow();
-
if (autoboot == AUTOBOOT_MENU)
run_command(MENUFILE);