diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-06 11:45:52 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-06 11:47:04 +0100 |
commit | 01b21e5e059ea8dabf2139f51879025a5422af04 (patch) | |
tree | 738ac1f7d72f155f60ac02ab9e7e37c06f2a8afd | |
parent | 9e570d0d6dcdaf2adce8d72430e84d2d487ea56c (diff) | |
download | serenity-01b21e5e059ea8dabf2139f51879025a5422af04.zip |
Kernel: Use KParams::has() instead of !KParams::get().is_null()
Also rename a local variable to be consistent with what it represents.
-rw-r--r-- | Kernel/init.cpp | 8 |
1 files 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<RandomDevice>(); auto dev_ptmx = make<PTYMultiplexer>(); - 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<const char*>(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) { |