From ec8febd9aef1f1ca8c35f6f0dc0a3b36f9dbc1e7 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 8 Feb 2015 01:54:12 +0100 Subject: boot: restore terminal state on exit * boot/boot.c (host_exit): Make it a function and restore the terminal state. --- boot/boot.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/boot/boot.c b/boot/boot.c index 462243c3..7f28f6b3 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 */ -- cgit v1.2.3