diff options
author | Simon Glass | 2014-02-27 13:26:22 -0700 |
---|---|---|
committer | Simon Glass | 2014-03-17 20:05:49 -0600 |
commit | ffb87905cb3883c84598b87ca05384c17d59dee1 (patch) | |
tree | 34a10775e3d35c5ebf5432222443094025cb14bb /include | |
parent | 20f86a0aeaad5dfa0b4f50bf5d04dd7bf1f7c3e9 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/os.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/os.h b/include/os.h index 9b5da5c43d5..0230a7f40da 100644 --- a/include/os.h +++ b/include/os.h @@ -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. |