From 01b21e5e059ea8dabf2139f51879025a5422af04 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 6 Nov 2019 11:45:52 +0100 Subject: Kernel: Use KParams::has() instead of !KParams::get().is_null() Also rename a local variable to be consistent with what it represents. --- Kernel/init.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 16b497bf03..7c0c66c9e0 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -66,7 +66,7 @@ VFS* vfs; auto dev_random = make(); auto dev_ptmx = make(); - bool textmode = !KParams::the().get("text_debug").is_null(); + bool text_debug = KParams::the().has("text_debug"); auto root = KParams::the().get("root"); if (root.is_empty()) { @@ -163,7 +163,7 @@ VFS* vfs; // SystemServer will start WindowServer, which will be doing graphics. // From this point on we don't want to touch the VGA text terminal or // accept keyboard input. - if (textmode) { + if (text_debug) { tty0->set_graphical(false); auto* shell_process = Process::create_user_process("/bin/Shell", (uid_t)0, (gid_t)0, (pid_t)0, error, {}, {}, tty0); if (error != 0) { @@ -236,7 +236,7 @@ extern "C" [[noreturn]] void init() // must come after kmalloc_init because we use AK_MAKE_ETERNAL in KParams new KParams(String(reinterpret_cast(multiboot_info_ptr->cmdline))); - bool textmode = !KParams::the().get("text_debug").is_null(); + bool text_debug = KParams::the().has("text_debug"); vfs = new VFS; dev_debuglog = new DebugLogDevice; @@ -285,7 +285,7 @@ extern "C" [[noreturn]] void init() id.device_id); }); - if (textmode) { + if (text_debug) { dbgprintf("Text mode enabled\n"); } else { if (multiboot_info_ptr->framebuffer_type == 1 || multiboot_info_ptr->framebuffer_type == 2) { -- cgit v1.2.3