mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
Kernel: Merge unnecessary DiskDevice class into BlockDevice
This commit is contained in:
parent
6be880bd10
commit
88ea152b24
Notes:
sideshowbarker
2024-07-19 09:32:16 +09:00
Author: https://github.com/awesomekling
Commit: 88ea152b24
27 changed files with 98 additions and 212 deletions
|
@ -58,13 +58,13 @@ static u8 to_ext2_file_type(mode_t mode)
|
|||
return EXT2_FT_UNKNOWN;
|
||||
}
|
||||
|
||||
NonnullRefPtr<Ext2FS> Ext2FS::create(NonnullRefPtr<DiskDevice> device)
|
||||
NonnullRefPtr<Ext2FS> Ext2FS::create(BlockDevice& device)
|
||||
{
|
||||
return adopt(*new Ext2FS(move(device)));
|
||||
return adopt(*new Ext2FS(device));
|
||||
}
|
||||
|
||||
Ext2FS::Ext2FS(NonnullRefPtr<DiskDevice>&& device)
|
||||
: DiskBackedFS(move(device))
|
||||
Ext2FS::Ext2FS(BlockDevice& device)
|
||||
: DiskBackedFS(device)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ const ext2_group_desc& Ext2FS::group_descriptor(GroupIndex group_index) const
|
|||
bool Ext2FS::initialize()
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
bool success = const_cast<DiskDevice&>(device()).read_blocks(2, 1, (u8*)&m_super_block);
|
||||
bool success = const_cast<BlockDevice&>(device()).read_blocks(2, 1, (u8*)&m_super_block);
|
||||
ASSERT(success);
|
||||
|
||||
auto& super_block = this->super_block();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue