diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2019-08-22 08:54:05 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-08-30 09:26:07 +0200 |
commit | d421771bcea063b9bce551e06552067b9074d015 (patch) | |
tree | 3d0ed37e1c43ff307820472b32baea73b9c0cc72 | |
parent | 6a0cade746d86ea1caeadbf598f01641a0dc830a (diff) | |
download | barebox-d421771bcea063b9bce551e06552067b9074d015.tar.gz barebox-d421771bcea063b9bce551e06552067b9074d015.tar.xz |
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>
-rw-r--r-- | common/startup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/startup.c b/common/startup.c index b5b86d1141..c6e119966a 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); |