From b4e409f721bce08b810a848c35d275c4ef692432 Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 13 May 2022 03:26:36 +0300 Subject: [PATCH] Kernel/Graphics: Drop support for the DisplayConnector write interface The WindowServer doesn't use this interface anymore and therefore it's not used by any userspace application, so let's remove this stale method to ensure we don't have to bother with it anymore. --- Kernel/Graphics/DisplayConnector.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Kernel/Graphics/DisplayConnector.cpp b/Kernel/Graphics/DisplayConnector.cpp index 31ae25e0b7..4365575475 100644 --- a/Kernel/Graphics/DisplayConnector.cpp +++ b/Kernel/Graphics/DisplayConnector.cpp @@ -48,18 +48,10 @@ ErrorOr DisplayConnector::read(OpenFileDescription&, u64, UserOrKernelBu { return Error::from_errno(ENOTIMPL); } -ErrorOr DisplayConnector::write(OpenFileDescription&, u64 offset, UserOrKernelBuffer const& framebuffer_data, size_t length) + +ErrorOr DisplayConnector::write(OpenFileDescription&, u64, UserOrKernelBuffer const&, size_t) { - SpinlockLocker locker(m_control_lock); - // FIXME: We silently ignore the request if we are in console mode. - // WindowServer is not ready yet to handle errors such as EBUSY currently. - if (console_mode()) { - return length; - } - if (offset + length > m_framebuffer_region->size()) - return Error::from_errno(EOVERFLOW); - TRY(framebuffer_data.read(m_framebuffer_data + offset, 0, length)); - return length; + return Error::from_errno(ENOTIMPL); } void DisplayConnector::will_be_destroyed()