mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
29 lines
509 B
C
29 lines
509 B
C
// The OS/K Team licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
#include <pc/device.h>
|
|
#include <pc/console.h>
|
|
|
|
void die(int code)
|
|
{
|
|
dying = 1;
|
|
|
|
enable_stdin_echoing();
|
|
|
|
if (main_ctx.mp)
|
|
free(main_ctx.mp);
|
|
|
|
console_exit(&main_ctx);
|
|
|
|
//
|
|
// Shut down devices
|
|
//
|
|
if (devfiniall(&main_ctx) < 0)
|
|
{
|
|
logerr("Couldn't deinitialize devices\n");
|
|
exit(-100 - code);
|
|
}
|
|
|
|
exit(code);
|
|
}
|