mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user