mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Remove dead code from BlockDevice
This commit is contained in:
parent
28b109688b
commit
96081010dc
2 changed files with 0 additions and 22 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue