Kernel: Make DevFS use the new and better TmpFS instead of RamFS
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <kernel/FS/RamFS/Inode.h>
|
||||
#include <kernel/FS/TmpFS/Inode.h>
|
||||
|
||||
namespace Kernel
|
||||
{
|
||||
|
||||
class Device : public RamInode
|
||||
class Device : public TmpInode
|
||||
{
|
||||
public:
|
||||
virtual ~Device() = default;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <kernel/Device/Device.h>
|
||||
#include <kernel/FS/RamFS/FileSystem.h>
|
||||
#include <kernel/FS/TmpFS/FileSystem.h>
|
||||
#include <kernel/Semaphore.h>
|
||||
|
||||
namespace Kernel
|
||||
{
|
||||
|
||||
class DevFileSystem final : public RamFileSystem
|
||||
class DevFileSystem final : public TmpFileSystem
|
||||
{
|
||||
public:
|
||||
static void initialize();
|
||||
@@ -16,7 +16,7 @@ namespace Kernel
|
||||
void initialize_device_updater();
|
||||
|
||||
void add_device(BAN::RefPtr<Device>);
|
||||
void add_inode(BAN::StringView path, BAN::RefPtr<RamInode>);
|
||||
void add_inode(BAN::StringView path, BAN::RefPtr<TmpInode>);
|
||||
void for_each_device(const BAN::Function<BAN::Iteration(Device*)>& callback);
|
||||
|
||||
dev_t get_next_dev() const;
|
||||
@@ -25,8 +25,8 @@ namespace Kernel
|
||||
void initiate_sync(bool should_block);
|
||||
|
||||
private:
|
||||
DevFileSystem(size_t size)
|
||||
: RamFileSystem(size)
|
||||
DevFileSystem()
|
||||
: TmpFileSystem(-1)
|
||||
{ }
|
||||
|
||||
private:
|
||||
|
||||
@@ -35,8 +35,8 @@ namespace Kernel
|
||||
virtual timespec ctime() const override final { return m_inode_info.ctime; }
|
||||
virtual blksize_t blksize() const override final { return PAGE_SIZE; }
|
||||
virtual blkcnt_t blocks() const override final { return m_inode_info.blocks; }
|
||||
virtual dev_t dev() const override final { return 0; } // TODO
|
||||
virtual dev_t rdev() const override final { return 0; } // TODO
|
||||
virtual dev_t dev() const override { return 0; } // TODO
|
||||
virtual dev_t rdev() const override { return 0; } // TODO
|
||||
|
||||
public:
|
||||
static BAN::ErrorOr<BAN::RefPtr<TmpInode>> create_from_existing(TmpFileSystem&, ino_t, const TmpInodeInfo&);
|
||||
|
||||
@@ -51,9 +51,6 @@ namespace Kernel
|
||||
public:
|
||||
virtual bool is_partition() const override { return true; }
|
||||
|
||||
virtual Mode mode() const override { return { Mode::IFBLK | Mode::IRUSR | Mode::IRGRP }; }
|
||||
virtual uid_t uid() const override { return 0; }
|
||||
virtual gid_t gid() const override { return 0; }
|
||||
virtual dev_t rdev() const override { return m_rdev; }
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user