From bd5f99ed371539d5ff68d8b61b7c33cda2334c68 Mon Sep 17 00:00:00 2001 From: Julian Barathieu Date: Thu, 9 May 2019 10:27:44 +0200 Subject: [PATCH] PoShutdown --- include/kernel/pwmgnt.h | 1 + kaleid/kernel/init/init.c | 3 +-- kaleid/kernel/po/shtdwn.c | 5 +++++ kaleid/kernel/sh/shcmds.c | 2 +- kaleid/kernel/sh/shell.c | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/kernel/pwmgnt.h b/include/kernel/pwmgnt.h index f3ffba9..a212866 100644 --- a/include/kernel/pwmgnt.h +++ b/include/kernel/pwmgnt.h @@ -31,6 +31,7 @@ //----------------------------------------------------------------------------// +noreturn void PoShutdown(void); noreturn void PoShutdownQemu(void); noreturn void PoShutdownVirtualbox(void); noreturn void PoShutdownBochs(void); diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index 5c7bcd9..11f80a4 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -64,6 +64,5 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) KeStartShell(); - KernLog("End of input reached\n"); - PoShutdownQemu(); + PoShutdown(); } diff --git a/kaleid/kernel/po/shtdwn.c b/kaleid/kernel/po/shtdwn.c index 7d405d3..d54db81 100644 --- a/kaleid/kernel/po/shtdwn.c +++ b/kaleid/kernel/po/shtdwn.c @@ -59,3 +59,8 @@ noreturn void PoShutdownBochs(void) __builtin_unreachable(); } +noreturn void PoShutdown(void) +{ + PoShutdownQemu(); +} + diff --git a/kaleid/kernel/sh/shcmds.c b/kaleid/kernel/sh/shcmds.c index 5ce7698..abc58b2 100644 --- a/kaleid/kernel/sh/shcmds.c +++ b/kaleid/kernel/sh/shcmds.c @@ -44,7 +44,7 @@ error_t CmdStarWars(int argc, char **argv, char *cmdline) error_t CmdQuit(int argc, char **argv, char *cmdline) { - PoShutdownQemu(); + PoShutdown(); return EOK; } diff --git a/kaleid/kernel/sh/shell.c b/kaleid/kernel/sh/shell.c index 8dcf6b9..8c961e2 100644 --- a/kaleid/kernel/sh/shell.c +++ b/kaleid/kernel/sh/shell.c @@ -111,7 +111,7 @@ void KeStartShell(void) break; case KEY_ESC: - PoShutdownQemu(); + PoShutdown(); break; default: