summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2023-04-26 19:30:55 -0400
committerAndreas Kling <kling@serenityos.org>2023-04-27 07:29:49 +0200
commit7fffa0176f89a75cd61e6653c89affdab9bdb5f6 (patch)
treecb77608918e3176610ab8e2dafdefd73b46a0cf3
parentf92ae03e76fad20ad01ebc5c7f8fe207a2098c19 (diff)
downloadserenity-7fffa0176f89a75cd61e6653c89affdab9bdb5f6.zip
KeyboardPreferenceLoader: Remove usage of `DeprecatedFile`
-rw-r--r--Userland/Services/KeyboardPreferenceLoader/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Userland/Services/KeyboardPreferenceLoader/main.cpp b/Userland/Services/KeyboardPreferenceLoader/main.cpp
index 5eb3eb46bb..87e990da06 100644
--- a/Userland/Services/KeyboardPreferenceLoader/main.cpp
+++ b/Userland/Services/KeyboardPreferenceLoader/main.cpp
@@ -5,15 +5,11 @@
*/
#include <LibCore/ConfigFile.h>
-#include <LibCore/DeprecatedFile.h>
+#include <LibCore/File.h>
#include <LibCore/Process.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
-#include <errno.h>
-#include <spawn.h>
-#include <stdio.h>
#include <sys/ioctl.h>
-#include <unistd.h>
ErrorOr<int> serenity_main(Main::Arguments)
{
@@ -34,7 +30,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
TRY(Core::Process::spawn("/bin/keymap"sv, Array { "-m", keymaps_vector.first().characters() }, {}, Core::Process::KeepAsChild::Yes));
bool enable_num_lock = keyboard_settings_config->read_bool_entry("StartupEnable", "NumLock", true);
- auto keyboard_device = TRY(Core::DeprecatedFile::open("/dev/input/keyboard/0", Core::OpenMode::ReadOnly));
+ auto keyboard_device = TRY(Core::File::open("/dev/input/keyboard/0"sv, Core::File::OpenMode::Read));
TRY(Core::System::ioctl(keyboard_device->fd(), KEYBOARD_IOCTL_SET_NUM_LOCK, enable_num_lock));
return 0;