summaryrefslogtreecommitdiff
path: root/Kernel/Devices/KeyboardDevice.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-29 13:58:40 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-29 13:58:40 +0200
commit8cbb7f101f1d7d8cf71a9347ddf3a6ca46a97b11 (patch)
tree75257c71c207ff7910aafd89517c0e31aa970e32 /Kernel/Devices/KeyboardDevice.cpp
parent3761bc3ed7bc245e5ba4119136e6e33698b30300 (diff)
downloadserenity-8cbb7f101f1d7d8cf71a9347ddf3a6ca46a97b11.zip
Kernel: Have File virtuals take a FileDescriptor& rather than a Process&.
This will allow us to implement different behaviors depending on the role of the descriptor a File is being accessed through.
Diffstat (limited to 'Kernel/Devices/KeyboardDevice.cpp')
-rw-r--r--Kernel/Devices/KeyboardDevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Devices/KeyboardDevice.cpp b/Kernel/Devices/KeyboardDevice.cpp
index 9348ed7f23..856fcc2fb8 100644
--- a/Kernel/Devices/KeyboardDevice.cpp
+++ b/Kernel/Devices/KeyboardDevice.cpp
@@ -208,12 +208,12 @@ KeyboardDevice::~KeyboardDevice()
{
}
-bool KeyboardDevice::can_read(Process&) const
+bool KeyboardDevice::can_read(FileDescriptor&) const
{
return !m_queue.is_empty();
}
-ssize_t KeyboardDevice::read(Process&, byte* buffer, ssize_t size)
+ssize_t KeyboardDevice::read(FileDescriptor&, byte* buffer, ssize_t size)
{
ssize_t nread = 0;
while (nread < size) {
@@ -229,7 +229,7 @@ ssize_t KeyboardDevice::read(Process&, byte* buffer, ssize_t size)
return nread;
}
-ssize_t KeyboardDevice::write(Process&, const byte*, ssize_t)
+ssize_t KeyboardDevice::write(FileDescriptor&, const byte*, ssize_t)
{
return 0;
}