diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-25 12:37:39 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-04-24 10:11:18 +0200 |
commit | ec5f3d3dbbc054cf704a658d2734b67df466926b (patch) | |
tree | eab1bd11acbd486b08e69951810fe6fbdb7f8f39 /include | |
parent | c5f991d2ad8ea2d872fad64dee2fd660bb0a1b20 (diff) | |
download | barebox-ec5f3d3dbbc054cf704a658d2734b67df466926b.tar.gz barebox-ec5f3d3dbbc054cf704a658d2734b67df466926b.tar.xz |
console: forbid ctrlc during startup
When global.autoboot_abort_key is set to ctrl-c then the user is
expected to press ctrl-c to get to the prompt. The user might press
ctrl-c before the init script runs the "timeout" command. In this
case the init script is aborted at arbitrary places which leads to
inconsistent results depending on the place it is aborted.
This patch introduces the global.console.ctrlc_allowed variable.
When this variable is set to false ctrl-c is ignored entirely.
The variable is set to false by default and changed to true in
the init script.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/console.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index 673921331d..4062e5abf6 100644 --- a/include/console.h +++ b/include/console.h @@ -207,4 +207,7 @@ static inline void pbl_set_putc(void (*putcf)(void *ctx, int c), void *ctx) {} bool console_allow_color(void); +void console_ctrlc_allow(void); +void console_ctrlc_forbid(void); + #endif |