mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
sandbox: Allow Ctrl-C to work in sandbox
It is useful for Cltl-C to be handled by U-Boot as it is on other boards. But it is also useful to be able to terminate U-Boot with Ctrl-C. Add an option to enable signals while in raw mode, and make this the default. Add an option to leave the terminal cooked, which is useful for redirecting output. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
20f86a0aea
commit
ffb87905cb
5 changed files with 69 additions and 8 deletions
|
@ -103,8 +103,12 @@ void os_exit(int exit_code) __attribute__((noreturn));
|
|||
|
||||
/**
|
||||
* Put tty into raw mode to mimic serial console better
|
||||
*
|
||||
* @param fd File descriptor of stdin (normally 0)
|
||||
* @param allow_sigs Allow Ctrl-C, Ctrl-Z to generate signals rather than
|
||||
* be handled by U-Boot
|
||||
*/
|
||||
void os_tty_raw(int fd);
|
||||
void os_tty_raw(int fd, bool allow_sigs);
|
||||
|
||||
/**
|
||||
* Acquires some memory from the underlying os.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue