summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-11-01 13:43:02 -0700
committerAndreas Kling <kling@serenityos.org>2020-11-04 21:21:37 +0100
commit96081010dc4a52607f027297241b555348703685 (patch)
tree4325f6ba8adb28efb37e5fc7058689ac089b025c /Kernel
parent28b109688bf279f34a96bd9c702b69e11269c59c (diff)
downloadserenity-96081010dc4a52607f027297241b555348703685.zip
Kernel: Remove dead code from BlockDevice
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Devices/BlockDevice.cpp20
-rw-r--r--Kernel/Devices/BlockDevice.h2
2 files changed, 0 insertions, 22 deletions
diff --git a/Kernel/Devices/BlockDevice.cpp b/Kernel/Devices/BlockDevice.cpp
index d78388b610..d1f70a14dd 100644
--- a/Kernel/Devices/BlockDevice.cpp
+++ b/Kernel/Devices/BlockDevice.cpp
@@ -42,24 +42,4 @@ bool BlockDevice::write_block(unsigned index, const UserOrKernelBuffer& data)
return write_blocks(index, 1, data);
}
-bool BlockDevice::read_raw(u32 offset, unsigned length, UserOrKernelBuffer& out) const
-{
- ASSERT((offset % block_size()) == 0);
- ASSERT((length % block_size()) == 0);
- u32 first_block = offset / block_size();
- u32 end_block = (offset + length) / block_size();
- return const_cast<BlockDevice*>(this)->read_blocks(first_block, end_block - first_block, out);
-}
-
-bool BlockDevice::write_raw(u32 offset, unsigned length, const UserOrKernelBuffer& in)
-{
- ASSERT((offset % block_size()) == 0);
- ASSERT((length % block_size()) == 0);
- u32 first_block = offset / block_size();
- u32 end_block = (offset + length) / block_size();
- ASSERT(first_block <= 0xffffffff);
- ASSERT(end_block <= 0xffffffff);
- return write_blocks(first_block, end_block - first_block, in);
-}
-
}
diff --git a/Kernel/Devices/BlockDevice.h b/Kernel/Devices/BlockDevice.h
index 69786df3f8..ee9a5bbead 100644
--- a/Kernel/Devices/BlockDevice.h
+++ b/Kernel/Devices/BlockDevice.h
@@ -39,8 +39,6 @@ public:
bool read_block(unsigned index, UserOrKernelBuffer&) const;
bool write_block(unsigned index, const UserOrKernelBuffer&);
- bool read_raw(u32 offset, unsigned length, UserOrKernelBuffer&) const;
- bool write_raw(u32 offset, unsigned length, const UserOrKernelBuffer&);
virtual bool read_blocks(unsigned index, u16 count, UserOrKernelBuffer&) = 0;
virtual bool write_blocks(unsigned index, u16 count, const UserOrKernelBuffer&) = 0;