diff --git a/Kernel/CommandLine.cpp b/Kernel/CommandLine.cpp index b87879ce7e..8b50e7aeec 100644 --- a/Kernel/CommandLine.cpp +++ b/Kernel/CommandLine.cpp @@ -66,11 +66,6 @@ Optional CommandLine::lookup(const String& key) const return m_params.get(key); } -String CommandLine::get(const String& key) const -{ - return m_params.get(key).value_or({}); -} - bool CommandLine::contains(const String& key) const { return m_params.contains(key); diff --git a/Kernel/CommandLine.h b/Kernel/CommandLine.h index a918b30e46..ec50cd4e9f 100644 --- a/Kernel/CommandLine.h +++ b/Kernel/CommandLine.h @@ -39,7 +39,6 @@ public: static void initialize(const String&); const String& string() const { return m_string; } - String get(const String& key) const; Optional lookup(const String& key) const; bool contains(const String& key) const; diff --git a/Kernel/Time/TimeManagement.cpp b/Kernel/Time/TimeManagement.cpp index c271e19ebd..d0baf30093 100644 --- a/Kernel/Time/TimeManagement.cpp +++ b/Kernel/Time/TimeManagement.cpp @@ -143,10 +143,7 @@ Vector TimeManagement::scan_for_non_periodic_timers() bool TimeManagement::is_hpet_periodic_mode_allowed() { - if (!kernel_command_line().contains("hpet")) - return true; - - auto hpet_mode = kernel_command_line().get("hpet"); + auto hpet_mode = kernel_command_line().lookup("hpet").value_or("periodic"); if (hpet_mode == "periodic") return true; if (hpet_mode == "nonperiodic") diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 142d4d07be..b043b40c87 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -216,10 +216,7 @@ void init_stage2() bool text_debug = kernel_command_line().contains("text_debug"); bool force_pio = kernel_command_line().contains("force_pio"); - auto root = kernel_command_line().get("root"); - if (root.is_empty()) { - root = "/dev/hda"; - } + auto root = kernel_command_line().lookup("root").value_or("/dev/hda"); if (!root.starts_with("/dev/hda")) { klog() << "init_stage2: root filesystem must be on the first IDE hard drive (/dev/hda)";