From 64e2d139fe1c9133b0eda0a9da8e8c2c03368dea Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Fri, 22 Jan 2016 11:05:32 +0100 Subject: [PATCH] Restore terminal settings on grub-emu exit. --- grub-core/kern/emu/main.c | 6 ++++++ grub-core/kern/emu/misc.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c index 51e8a5715..953a93c8a 100644 --- a/grub-core/kern/emu/main.c +++ b/grub-core/kern/emu/main.c @@ -65,6 +65,12 @@ grub_reboot (void) longjmp (main_env, 1); } +void +grub_exit (void) +{ + grub_reboot (); +} + void grub_machine_init (void) { diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c index 06985013d..d361feb00 100644 --- a/grub-core/kern/emu/misc.c +++ b/grub-core/kern/emu/misc.c @@ -134,11 +134,13 @@ xasprintf (const char *fmt, ...) } #endif +#if !defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL) void grub_exit (void) { exit (1); } +#endif grub_uint64_t grub_get_time_ms (void)