mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
Kernel/CommandLine: Verify ACPI feature level cannot have invalid string
The allowed options are "on", "limited" and "off". Anything else is now not allowed and will result in kernel panic.
This commit is contained in:
parent
026f80a95b
commit
d0245b5e6b
1 changed files with 3 additions and 1 deletions
|
@ -142,7 +142,9 @@ UNMAP_AFTER_INIT AcpiFeatureLevel CommandLine::acpi_feature_level() const
|
|||
return AcpiFeatureLevel::Limited;
|
||||
if (value == "off"sv)
|
||||
return AcpiFeatureLevel::Disabled;
|
||||
return AcpiFeatureLevel::Enabled;
|
||||
if (value == "on"sv)
|
||||
return AcpiFeatureLevel::Enabled;
|
||||
PANIC("Unknown ACPI feature level: {}", value);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT HPETMode CommandLine::hpet_mode() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue