Kernel/FileSystem: Simplify the ProcFS inode code

This is done by merging all scattered pieces of derived classes from the
ProcFSInode class into that one class, so we don't use inheritance but
rather simplistic checks to determine the proper code for each ProcFS
inode with its specific characteristics.
This commit is contained in:
Liav A 2022-11-25 22:29:27 +02:00 committed by Jelle Raaijmakers
commit 722ae35329
Notes: sideshowbarker 2024-07-17 01:04:03 +09:00
25 changed files with 583 additions and 913 deletions

View file

@ -6,8 +6,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/FileSystem/ProcFS/DirectoryInode.h>
#include <Kernel/FileSystem/ProcFS/FileSystem.h>
#include <Kernel/FileSystem/ProcFS/Inode.h>
#include <Kernel/ProcessExposed.h>
namespace Kernel {
@ -22,7 +22,7 @@ ProcFS::~ProcFS() = default;
ErrorOr<void> ProcFS::initialize()
{
m_root_inode = static_ptr_cast<ProcFSDirectoryInode>(TRY(ProcFSComponentRegistry::the().root_directory().to_inode(*this)));
m_root_inode = TRY(ProcFSComponentRegistry::the().root_directory().to_inode(*this));
return {};
}