mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
Kernel: Separate panic behavior from bootmode
Bootmode used to control panic behavior and SystemServer. This patch factors panic behavior control into a separate flag.
This commit is contained in:
parent
542a88a7be
commit
09432a8241
8 changed files with 37 additions and 6 deletions
|
@ -33,9 +33,13 @@ void __panic(const char* file, unsigned int line, const char* function)
|
|||
|
||||
critical_dmesgln("at {}:{} in {}", file, line, function);
|
||||
dump_backtrace(PrintToScreen::Yes);
|
||||
if (kernel_command_line().boot_mode() == BootMode::SelfTest)
|
||||
switch (kernel_command_line().panic_mode()) {
|
||||
case PanicMode::Shutdown:
|
||||
__shutdown();
|
||||
else
|
||||
case PanicMode::Halt:
|
||||
[[fallthrough]];
|
||||
default:
|
||||
Processor::halt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue