diff options
Diffstat (limited to 'Kernel/FileSystem/DevPtsFS/FileSystem.h')
-rw-r--r-- | Kernel/FileSystem/DevPtsFS/FileSystem.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Kernel/FileSystem/DevPtsFS/FileSystem.h b/Kernel/FileSystem/DevPtsFS/FileSystem.h new file mode 100644 index 0000000000..801347387d --- /dev/null +++ b/Kernel/FileSystem/DevPtsFS/FileSystem.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <AK/Types.h> +#include <Kernel/FileSystem/FileSystem.h> +#include <Kernel/FileSystem/Inode.h> + +namespace Kernel { + +class SlavePTY; +class DevPtsFSInode; + +class DevPtsFS final : public FileSystem { + friend class DevPtsFSInode; + +public: + virtual ~DevPtsFS() override; + static ErrorOr<NonnullLockRefPtr<FileSystem>> try_create(); + + virtual ErrorOr<void> initialize() override; + virtual StringView class_name() const override { return "DevPtsFS"sv; } + + virtual Inode& root_inode() override; + +private: + DevPtsFS(); + ErrorOr<NonnullLockRefPtr<Inode>> get_inode(InodeIdentifier) const; + + LockRefPtr<DevPtsFSInode> m_root_inode; +}; + +} |