summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Ext2FileSystem.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-08 02:17:26 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-08 02:20:03 +0100
commit88ea152b2425338ad0ad9a199590f396590f7b5a (patch)
tree168518e8f49cf651273aac98a8e85285ea058664 /Kernel/FileSystem/Ext2FileSystem.cpp
parent6be880bd10dce91114706704aa8f1f27bbdce89f (diff)
downloadserenity-88ea152b2425338ad0ad9a199590f396590f7b5a.zip
Kernel: Merge unnecessary DiskDevice class into BlockDevice
Diffstat (limited to 'Kernel/FileSystem/Ext2FileSystem.cpp')
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index 2e07e5c4cb..bd7d52519c 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -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();