mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39: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
Notes:
sideshowbarker
2024-07-18 04:19:36 +09:00
Author: https://github.com/supercomputer7
Commit: d0245b5e6b
Pull-request: https://github.com/SerenityOS/serenity/pull/9934
Reviewed-by: https://github.com/IdanHo ✅
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