mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
673592dea8
There was only one permanent storage location for these: as a member in the Mount class. That member is never modified after Mount initialization, so we don't need to worry about races there.
36 lines
779 B
C++
36 lines
779 B
C++
/*
|
|
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Kernel/FileSystem/FileSystem.h>
|
|
#include <Kernel/FileSystem/Inode.h>
|
|
#include <Kernel/FileSystem/SysFS/Component.h>
|
|
#include <Kernel/Forward.h>
|
|
#include <Kernel/Locking/MutexProtected.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class SysFS final : public FileSystem {
|
|
friend class SysFSInode;
|
|
friend class SysFSDirectoryInode;
|
|
|
|
public:
|
|
virtual ~SysFS() override;
|
|
static ErrorOr<NonnullRefPtr<FileSystem>> try_create();
|
|
|
|
virtual ErrorOr<void> initialize() override;
|
|
virtual StringView class_name() const override { return "SysFS"sv; }
|
|
|
|
virtual Inode& root_inode() override;
|
|
|
|
private:
|
|
SysFS();
|
|
|
|
RefPtr<SysFSInode> m_root_inode;
|
|
};
|
|
|
|
}
|