diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-02-08 01:54:12 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-11-01 15:18:19 +0100 |
commit | 7ab8e74f1331b70dd52e604d0010a49fabf9e549 (patch) | |
tree | 6fc802f4ffce9a5c65e3199b92be186a329b5533 /boot | |
parent | 411806400bcc72e9f6004c40b3af8960df452be5 (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.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/boot/boot.c b/boot/boot.c index 69c30333..ab9c1648 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -90,7 +90,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); +} mach_port_t privileged_host_port, master_device_port; mach_port_t pseudo_master_device_port; |