mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 14:25:06 +00:00
Kernel: Ensure that CommandLine is initialized before choosing PanicMode
If the kernel commandline is not initialized, just halt everything.
This commit is contained in:
parent
0adee378fd
commit
d67c70d043
3 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,8 @@ void __panic(const char* file, unsigned int line, const char* function)
|
|||
|
||||
critical_dmesgln("at {}:{} in {}", file, line, function);
|
||||
dump_backtrace(PrintToScreen::Yes);
|
||||
if (!CommandLine::was_initialized())
|
||||
Processor::halt();
|
||||
switch (kernel_command_line().panic_mode()) {
|
||||
case PanicMode::Shutdown:
|
||||
__shutdown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue