summaryrefslogtreecommitdiff
path: root/Kernel/Devices/MBVGADevice.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-17 15:04:27 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-17 15:04:27 +0100
commit48f7c28a5cee78398c64d94f7dc3c6bf5a66ce77 (patch)
treec072ef54fa2e311ac8119e2f2f1ed69c5a22a061 /Kernel/Devices/MBVGADevice.cpp
parent4f4af24b9d489634a66d818260a7f87964faf421 (diff)
downloadserenity-48f7c28a5cee78398c64d94f7dc3c6bf5a66ce77.zip
Kernel: Replace "current" with Thread::current and Process::current
Suggested by Sergey. The currently running Thread and Process are now Thread::current and Process::current respectively. :^)
Diffstat (limited to 'Kernel/Devices/MBVGADevice.cpp')
-rw-r--r--Kernel/Devices/MBVGADevice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Devices/MBVGADevice.cpp b/Kernel/Devices/MBVGADevice.cpp
index e2def785ab..6acacddbc6 100644
--- a/Kernel/Devices/MBVGADevice.cpp
+++ b/Kernel/Devices/MBVGADevice.cpp
@@ -77,21 +77,21 @@ int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
switch (request) {
case FB_IOCTL_GET_SIZE_IN_BYTES: {
auto* out = (size_t*)arg;
- if (!current->process().validate_write_typed(out))
+ if (!Process::current->validate_write_typed(out))
return -EFAULT;
*out = framebuffer_size_in_bytes();
return 0;
}
case FB_IOCTL_GET_BUFFER: {
auto* index = (int*)arg;
- if (!current->process().validate_write_typed(index))
+ if (!Process::current->validate_write_typed(index))
return -EFAULT;
*index = 0;
return 0;
}
case FB_IOCTL_GET_RESOLUTION: {
auto* resolution = (FBResolution*)arg;
- if (!current->process().validate_write_typed(resolution))
+ if (!Process::current->validate_write_typed(resolution))
return -EFAULT;
resolution->pitch = m_framebuffer_pitch;
resolution->width = m_framebuffer_width;
@@ -100,7 +100,7 @@ int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
}
case FB_IOCTL_SET_RESOLUTION: {
auto* resolution = (FBResolution*)arg;
- if (!current->process().validate_read_typed(resolution) || !current->process().validate_write_typed(resolution))
+ if (!Process::current->validate_read_typed(resolution) || !Process::current->validate_write_typed(resolution))
return -EFAULT;
resolution->pitch = m_framebuffer_pitch;
resolution->width = m_framebuffer_width;