summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-02-08 01:54:12 +0100
committerJustus Winter <justus@gnupg.org>2016-10-27 11:52:14 +0200
commit2471737c4d9d8d19436df86717c53d526a156d0d (patch)
treeab0c9dd86a131e8d51fa501e5dc46f9a1e26d401 /boot
parent1a242fd36a01d0e7cca302ec9a516e17a97e5ff9 (diff)
boot: restore terminal state on exit
* boot/boot.c (host_exit): Make it a function and restore the terminal state.
Diffstat (limited to 'boot')
-rw-r--r--boot/boot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/boot/boot.c b/boot/boot.c
index 02af0688..826d7e60 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -105,7 +105,13 @@ restore_termstate ()
#define host_fstat fstat
typedef struct stat host_stat_t;
-#define host_exit exit
+
+void __attribute__ ((__noreturn__))
+host_exit (int status)
+{
+ restore_termstate ();
+ exit (status);
+}
#endif /* UX */