diff options
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/SysFS.cpp | 17 | ||||
-rw-r--r-- | Kernel/FileSystem/SysFS.h | 18 |
2 files changed, 17 insertions, 18 deletions
diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp index d737f7f2d8..cc16af1782 100644 --- a/Kernel/FileSystem/SysFS.cpp +++ b/Kernel/FileSystem/SysFS.cpp @@ -5,7 +5,6 @@ */ #include <AK/Singleton.h> -#include <AK/StringBuilder.h> #include <AK/StringView.h> #include <Kernel/FileSystem/SysFS.h> #include <Kernel/FileSystem/VirtualFileSystem.h> @@ -85,12 +84,12 @@ NonnullRefPtr<Inode> SysFS::root_inode() const return *m_root_inode; } -NonnullRefPtr<SysFSInode> SysFSInode::create(const SysFS& fs, const SystemExposedComponent& component) +NonnullRefPtr<SysFSInode> SysFSInode::create(SysFS const& fs, SystemExposedComponent const& component) { return adopt_ref(*new (nothrow) SysFSInode(fs, component)); } -SysFSInode::SysFSInode(const SysFS& fs, const SystemExposedComponent& component) +SysFSInode::SysFSInode(SysFS const& fs, SystemExposedComponent const& component) : Inode(const_cast<SysFS&>(fs), component.component_index()) , m_associated_component(component) { @@ -128,22 +127,22 @@ void SysFSInode::flush_metadata() { } -KResultOr<size_t> SysFSInode::write_bytes(off_t offset, size_t count, const UserOrKernelBuffer& buffer, FileDescription* fd) +KResultOr<size_t> SysFSInode::write_bytes(off_t offset, size_t count, UserOrKernelBuffer const& buffer, FileDescription* fd) { return m_associated_component->write_bytes(offset, count, buffer, fd); } -KResultOr<NonnullRefPtr<Inode>> SysFSInode::create_child(const String&, mode_t, dev_t, uid_t, gid_t) +KResultOr<NonnullRefPtr<Inode>> SysFSInode::create_child(String const&, mode_t, dev_t, uid_t, gid_t) { return EROFS; } -KResult SysFSInode::add_child(Inode&, const StringView&, mode_t) +KResult SysFSInode::add_child(Inode&, StringView const&, mode_t) { return EROFS; } -KResult SysFSInode::remove_child(const StringView&) +KResult SysFSInode::remove_child(StringView const&) { return EROFS; } @@ -168,12 +167,12 @@ KResult SysFSInode::truncate(u64) return EPERM; } -NonnullRefPtr<SysFSDirectoryInode> SysFSDirectoryInode::create(const SysFS& sysfs, const SystemExposedComponent& component) +NonnullRefPtr<SysFSDirectoryInode> SysFSDirectoryInode::create(SysFS const& sysfs, SystemExposedComponent const& component) { return adopt_ref(*new (nothrow) SysFSDirectoryInode(sysfs, component)); } -SysFSDirectoryInode::SysFSDirectoryInode(const SysFS& fs, const SystemExposedComponent& component) +SysFSDirectoryInode::SysFSDirectoryInode(SysFS const& fs, SystemExposedComponent const& component) : SysFSInode(fs, component) , m_parent_fs(const_cast<SysFS&>(fs)) { diff --git a/Kernel/FileSystem/SysFS.h b/Kernel/FileSystem/SysFS.h index 68779256cd..7fe8a82806 100644 --- a/Kernel/FileSystem/SysFS.h +++ b/Kernel/FileSystem/SysFS.h @@ -62,7 +62,7 @@ public: static NonnullRefPtr<SysFS> create(); virtual bool initialize() override; - virtual const char* class_name() const override { return "SysFS"; } + virtual char const* class_name() const override { return "SysFS"; } virtual NonnullRefPtr<Inode> root_inode() const override; @@ -77,20 +77,20 @@ class SysFSInode : public Inode { friend class SysFSDirectoryInode; public: - static NonnullRefPtr<SysFSInode> create(const SysFS&, const SystemExposedComponent&); + static NonnullRefPtr<SysFSInode> create(SysFS const&, SystemExposedComponent const&); StringView name() const { return m_associated_component->name(); } protected: - SysFSInode(const SysFS&, const SystemExposedComponent&); + SysFSInode(SysFS const&, SystemExposedComponent const&); virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer& buffer, FileDescription*) const override; virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override; virtual RefPtr<Inode> lookup(StringView name) override; virtual void flush_metadata() override; virtual InodeMetadata metadata() const override; - virtual KResultOr<size_t> write_bytes(off_t, size_t, const UserOrKernelBuffer& buffer, FileDescription*) override; - virtual KResultOr<NonnullRefPtr<Inode>> create_child(const String& name, mode_t, dev_t, uid_t, gid_t) override; - virtual KResult add_child(Inode&, const StringView& name, mode_t) override; - virtual KResult remove_child(const StringView& name) override; + virtual KResultOr<size_t> write_bytes(off_t, size_t, UserOrKernelBuffer const&, FileDescription*) override; + virtual KResultOr<NonnullRefPtr<Inode>> create_child(String const& name, mode_t, dev_t, uid_t, gid_t) override; + virtual KResult add_child(Inode&, StringView const& name, mode_t) override; + virtual KResult remove_child(StringView const& name) override; virtual KResultOr<size_t> directory_entry_count() const override; virtual KResult chmod(mode_t) override; virtual KResult chown(uid_t, gid_t) override; @@ -104,11 +104,11 @@ class SysFSDirectoryInode : public SysFSInode { friend class SysFSRootDirectoryInode; public: - static NonnullRefPtr<SysFSDirectoryInode> create(const SysFS&, const SystemExposedComponent&); + static NonnullRefPtr<SysFSDirectoryInode> create(SysFS const&, SystemExposedComponent const&); virtual ~SysFSDirectoryInode() override; protected: - SysFSDirectoryInode(const SysFS&, const SystemExposedComponent&); + SysFSDirectoryInode(SysFS const&, SystemExposedComponent const&); // ^Inode virtual InodeMetadata metadata() const override; virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override; |