summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/Devices/BXVGADevice.cpp20
-rw-r--r--Kernel/Devices/BXVGADevice.h8
-rw-r--r--Kernel/Devices/MBVGADevice.cpp20
-rw-r--r--Kernel/Devices/MBVGADevice.h8
4 files changed, 8 insertions, 48 deletions
diff --git a/Kernel/Devices/BXVGADevice.cpp b/Kernel/Devices/BXVGADevice.cpp
index 5c277075d1..9ee46c7c9b 100644
--- a/Kernel/Devices/BXVGADevice.cpp
+++ b/Kernel/Devices/BXVGADevice.cpp
@@ -149,23 +149,3 @@ int BXVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
return -EINVAL;
};
}
-
-bool BXVGADevice::can_read(const FileDescription&) const
-{
- ASSERT_NOT_REACHED();
-}
-
-bool BXVGADevice::can_write(const FileDescription&) const
-{
- ASSERT_NOT_REACHED();
-}
-
-ssize_t BXVGADevice::read(FileDescription&, u8*, ssize_t)
-{
- ASSERT_NOT_REACHED();
-}
-
-ssize_t BXVGADevice::write(FileDescription&, const u8*, ssize_t)
-{
- ASSERT_NOT_REACHED();
-}
diff --git a/Kernel/Devices/BXVGADevice.h b/Kernel/Devices/BXVGADevice.h
index 465203a9a8..1fdf454a7e 100644
--- a/Kernel/Devices/BXVGADevice.h
+++ b/Kernel/Devices/BXVGADevice.h
@@ -17,10 +17,10 @@ public:
private:
virtual const char* class_name() const override { return "BXVGA"; }
- virtual bool can_read(const FileDescription&) const override;
- virtual bool can_write(const FileDescription&) const override;
- virtual ssize_t read(FileDescription&, u8*, ssize_t) override;
- virtual ssize_t write(FileDescription&, const u8*, ssize_t) override;
+ virtual bool can_read(const FileDescription&) const override { return true; }
+ virtual bool can_write(const FileDescription&) const override { return true; }
+ virtual ssize_t read(FileDescription&, u8*, ssize_t) override { return -EINVAL; }
+ virtual ssize_t write(FileDescription&, const u8*, ssize_t) override { return -EINVAL; }
void set_register(u16 index, u16 value);
u32 find_framebuffer_address();
diff --git a/Kernel/Devices/MBVGADevice.cpp b/Kernel/Devices/MBVGADevice.cpp
index 2b4554e7e5..887a06f355 100644
--- a/Kernel/Devices/MBVGADevice.cpp
+++ b/Kernel/Devices/MBVGADevice.cpp
@@ -81,23 +81,3 @@ int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
return -EINVAL;
};
}
-
-bool MBVGADevice::can_read(const FileDescription&) const
-{
- ASSERT_NOT_REACHED();
-}
-
-bool MBVGADevice::can_write(const FileDescription&) const
-{
- ASSERT_NOT_REACHED();
-}
-
-ssize_t MBVGADevice::read(FileDescription&, u8*, ssize_t)
-{
- ASSERT_NOT_REACHED();
-}
-
-ssize_t MBVGADevice::write(FileDescription&, const u8*, ssize_t)
-{
- ASSERT_NOT_REACHED();
-}
diff --git a/Kernel/Devices/MBVGADevice.h b/Kernel/Devices/MBVGADevice.h
index a7980a1fcb..c02002540a 100644
--- a/Kernel/Devices/MBVGADevice.h
+++ b/Kernel/Devices/MBVGADevice.h
@@ -17,10 +17,10 @@ public:
private:
virtual const char* class_name() const override { return "MBVGA"; }
- virtual bool can_read(const FileDescription&) const override;
- virtual bool can_write(const FileDescription&) const override;
- virtual ssize_t read(FileDescription&, u8*, ssize_t) override;
- virtual ssize_t write(FileDescription&, const u8*, ssize_t) override;
+ virtual bool can_read(const FileDescription&) const override { return true; }
+ virtual bool can_write(const FileDescription&) const override { return true; }
+ virtual ssize_t read(FileDescription&, u8*, ssize_t) override { return -EINVAL; }
+ virtual ssize_t write(FileDescription&, const u8*, ssize_t) override { return -EINVAL; }
size_t framebuffer_size_in_bytes() const { return m_framebuffer_pitch * m_framebuffer_height; }