1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:38:10 +00:00

Kernel: Move Kernel CommandLine parsing to strongly typed API.

Previously all of the CommandLine parsing was spread out around the
Kernel. Instead move it all into the Kernel CommandLine class, and
expose a strongly typed API for querying the state of options.
This commit is contained in:
Brian Gianforcaro 2021-03-03 00:51:55 -08:00 committed by Andreas Kling
parent 74881ac649
commit 84a399de5d
9 changed files with 143 additions and 45 deletions

View file

@ -62,7 +62,7 @@ bool StorageManagement::boot_argument_contains_partition_uuid()
NonnullRefPtrVector<StorageController> StorageManagement::enumerate_controllers(bool force_pio) const
{
NonnullRefPtrVector<StorageController> controllers;
if (!kernel_command_line().contains("disable_ide")) {
if (kernel_command_line().is_ide_enabled()) {
PCI::enumerate([&](const PCI::Address& address, PCI::ID) {
if (PCI::get_class(address) == 0x1 && PCI::get_subclass(address) == 0x1) {
controllers.append(IDEController::initialize(address, force_pio));