summaryrefslogtreecommitdiff
path: root/include/os.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-05-11 03:07:27 (GMT)
committerSimon Glass <sjg@chromium.org>2015-06-04 09:34:47 (GMT)
commit8939df092e24abdf39edb6fbca90fe9c2b44c3b1 (patch)
treedc10fddd793983f313578d05fae3c6064c00319f /include/os.h
parentd8abb46b37fadff0349adb376df6d3ecd09ee7d1 (diff)
downloadu-boot-fsl-qoriq-8939df092e24abdf39edb6fbca90fe9c2b44c3b1.tar.xz
sandbox: Tidy up terminal restore
For some reason 'u-boot -D' does not restore the terminal correctly when the 'reset' command is used. Call the terminal restore function explicitly in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/os.h')
-rw-r--r--include/os.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h
index ffbdce8..954a48c 100644
--- a/include/os.h
+++ b/include/os.h
@@ -112,6 +112,14 @@ void os_exit(int exit_code) __attribute__((noreturn));
void os_tty_raw(int fd, bool allow_sigs);
/**
+ * Restore the tty to its original mode
+ *
+ * Call this to restore the original terminal mode, after it has been changed
+ * by os_tty_raw(). This is an internal function.
+ */
+void os_fd_restore(void);
+
+/**
* Acquires some memory from the underlying os.
*
* \param length Number of bytes to be allocated