summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-02-05 20:47:53 +0200
committerAndreas Kling <kling@serenityos.org>2020-02-05 23:01:41 +0100
commit8a412564974cb54d22eb170427657be71526f3b1 (patch)
tree6fb07cb0faeee0d86a6512cf711e5a5acc959065
parentb5857ceaadd870390aff3a9daa3cf03bc3faa7e2 (diff)
downloadserenity-8a412564974cb54d22eb170427657be71526f3b1.zip
Kernel Commandline: Change no_vmmouse boot argument to be vmmouse
Instead of having no_vmmouse, the boot argument now is vmmouse='on|off'.
-rw-r--r--Kernel/init.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index 6c5d50a5b2..b201f939a1 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -75,6 +75,7 @@
[[noreturn]] static void init_stage2();
static void setup_serial_debug();
static void setup_acpi();
+static void setup_vmmouse();
VirtualConsole* tty0;
@@ -123,9 +124,7 @@ extern "C" [[noreturn]] void init()
new KeyboardDevice;
new PS2MouseDevice;
- VMWareBackdoor::initialize();
- if (!KParams::the().has("no_vmmouse"))
- VMWareBackdoor::the().enable_absolute_vmmouse();
+ setup_vmmouse();
new SB16;
new NullDevice;
@@ -420,3 +419,21 @@ void setup_acpi()
kprintf("acpi boot argmuent has an invalid value.\n");
hang();
}
+
+void setup_vmmouse()
+{
+ VMWareBackdoor::initialize();
+ if (!KParams::the().has("vmmouse")) {
+ VMWareBackdoor::the().enable_absolute_vmmouse();
+ return;
+ }
+ auto vmmouse = KParams::the().get("vmmouse");
+ if (vmmouse == "off")
+ return;
+ if (vmmouse == "on") {
+ VMWareBackdoor::the().enable_absolute_vmmouse();
+ return;
+ }
+ kprintf("vmmouse boot argmuent has an invalid value.\n");
+ hang();
+}