mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
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:
parent
e9dcc49f9c
commit
722ae35329
Notes:
sideshowbarker
2024-07-17 01:04:03 +09:00
Author: https://github.com/supercomputer7
Commit: 722ae35329
Pull-request: https://github.com/SerenityOS/serenity/pull/16189
Reviewed-by: https://github.com/ADKaster
25 changed files with 583 additions and 913 deletions
|
@ -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 {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue