mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:47:45 +00:00
Kernel+KeyboardSettings: Remove numlock syscall and implement ioctl
This commit is contained in:
parent
385e2ccb66
commit
99328e1038
10 changed files with 21 additions and 38 deletions
|
@ -142,7 +142,6 @@ namespace Kernel {
|
|||
S(getrandom) \
|
||||
S(getkeymap) \
|
||||
S(setkeymap) \
|
||||
S(set_num_lock) \
|
||||
S(clock_gettime) \
|
||||
S(clock_settime) \
|
||||
S(clock_nanosleep) \
|
||||
|
|
|
@ -191,7 +191,6 @@ set(KERNEL_SOURCES
|
|||
Syscalls/mmap.cpp
|
||||
Syscalls/module.cpp
|
||||
Syscalls/mount.cpp
|
||||
Syscalls/num_lock.cpp
|
||||
Syscalls/open.cpp
|
||||
Syscalls/perf_event.cpp
|
||||
Syscalls/pipe.cpp
|
||||
|
|
|
@ -98,11 +98,6 @@ void HIDManagement::set_maps(const Keyboard::CharacterMapData& character_map_dat
|
|||
dbgln("New Character map '{}' passed in by client.", character_map_name);
|
||||
}
|
||||
|
||||
void HIDManagement::set_num_lock(bool on)
|
||||
{
|
||||
m_i8042_controller->keyboard()->set_num_lock(on);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT void HIDManagement::enumerate()
|
||||
{
|
||||
// FIXME: When we have USB HID support, we should ensure that we disable
|
||||
|
|
|
@ -45,7 +45,6 @@ public:
|
|||
const Keyboard::CharacterMap& character_map() const { return m_character_map; }
|
||||
void set_client(KeyboardClient* client) { m_client = client; }
|
||||
void set_maps(const Keyboard::CharacterMapData& character_map, const String& character_map_name);
|
||||
void set_num_lock(bool on);
|
||||
|
||||
private:
|
||||
size_t generate_minor_device_number_for_mouse();
|
||||
|
|
|
@ -49,8 +49,6 @@ public:
|
|||
m_modifiers &= ~modifier;
|
||||
}
|
||||
|
||||
void set_num_lock(bool on) { m_num_lock_on = on; }
|
||||
|
||||
protected:
|
||||
KeyboardDevice();
|
||||
mutable SpinLock<u8> m_queue_lock;
|
||||
|
|
|
@ -290,7 +290,6 @@ public:
|
|||
KResultOr<FlatPtr> sys$getresuid(Userspace<uid_t*>, Userspace<uid_t*>, Userspace<uid_t*>);
|
||||
KResultOr<FlatPtr> sys$getresgid(Userspace<gid_t*>, Userspace<gid_t*>, Userspace<gid_t*>);
|
||||
KResultOr<FlatPtr> sys$umask(mode_t);
|
||||
KResultOr<FlatPtr> sys$set_num_lock(bool);
|
||||
KResultOr<FlatPtr> sys$open(Userspace<const Syscall::SC_open_params*>);
|
||||
KResultOr<FlatPtr> sys$close(int fd);
|
||||
KResultOr<FlatPtr> sys$read(int fd, Userspace<u8*>, size_t);
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Devices/HID/HIDManagement.h>
|
||||
#include <Kernel/Process.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$set_num_lock(bool on)
|
||||
{
|
||||
HIDManagement::the().set_num_lock(on);
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue