forked from Bananymous/banan-os
Kernel: Move Partition out of StorageDevice and rename functions
This commit is contained in:
@@ -142,7 +142,7 @@ namespace Kernel
|
||||
|
||||
virtual BAN::ErrorOr<void> create_file(BAN::StringView, mode_t) override;
|
||||
|
||||
virtual Type type() const override { return Type::Ext2; }
|
||||
virtual InodeType type() const override { return InodeType::Ext2; }
|
||||
virtual bool operator==(const Inode& other) const override;
|
||||
|
||||
protected:
|
||||
@@ -175,12 +175,12 @@ namespace Kernel
|
||||
class Ext2FS : public FileSystem
|
||||
{
|
||||
public:
|
||||
static BAN::ErrorOr<Ext2FS*> create(StorageDevice::Partition&);
|
||||
static BAN::ErrorOr<Ext2FS*> create(Partition&);
|
||||
|
||||
virtual BAN::RefPtr<Inode> root_inode() override { return m_root_inode; }
|
||||
|
||||
private:
|
||||
Ext2FS(StorageDevice::Partition& partition)
|
||||
Ext2FS(Partition& partition)
|
||||
: m_partition(partition)
|
||||
{}
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace Kernel
|
||||
uint32_t block_size() const { return 1024 << superblock().log_block_size; }
|
||||
|
||||
private:
|
||||
StorageDevice::Partition& m_partition;
|
||||
Partition& m_partition;
|
||||
|
||||
BAN::RefPtr<Inode> m_root_inode;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Kernel
|
||||
IFREG = 0x8000,
|
||||
};
|
||||
|
||||
enum class Type
|
||||
enum class InodeType
|
||||
{
|
||||
DeviceManager,
|
||||
Device,
|
||||
@@ -66,7 +66,7 @@ namespace Kernel
|
||||
virtual BAN::ErrorOr<size_t> read(size_t, void*, size_t) = 0;
|
||||
virtual BAN::ErrorOr<void> create_file(BAN::StringView, mode_t) = 0;
|
||||
|
||||
virtual Type type() const = 0;
|
||||
virtual InodeType type() const = 0;
|
||||
virtual bool operator==(const Inode&) const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user