Kernel: Kernel::Panic now checks that TTY is initialized instead of VESA
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <kernel/kprint.h>
|
||||
#include <kernel/Serial.h>
|
||||
#include <kernel/VESA.h>
|
||||
#include <kernel/TTY.h>
|
||||
|
||||
#define Panic(...) PanicImpl(__FILE__, __LINE__, __VA_ARGS__)
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Kernel
|
||||
__attribute__((__noreturn__))
|
||||
static void PanicImpl(const char* file, int line, const char* message, Args... args)
|
||||
{
|
||||
if (VESA::IsInitialized())
|
||||
if (TTY::IsInitialized())
|
||||
{
|
||||
kprint("\e[31mKernel panic at {}:{}\n", file, line);
|
||||
kprint(message, args...);
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
|
||||
// for kprint
|
||||
static void PutCharCurrent(char ch);
|
||||
static bool IsInitialized();
|
||||
|
||||
private:
|
||||
void ResetAnsiEscape();
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace VESA
|
||||
};
|
||||
|
||||
bool Initialize();
|
||||
bool IsInitialized();
|
||||
void PutBitmapAt(const uint8_t*, uint32_t, uint32_t, Color);
|
||||
void PutBitmapAt(const uint8_t*, uint32_t, uint32_t, Color, Color);
|
||||
void PutCharAt(uint16_t, uint32_t, uint32_t, Color, Color);
|
||||
|
||||
Reference in New Issue
Block a user