mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel/FileSystem: Simplify even more the mount syscall
As with the previous commit, we put a distinction between filesystems that require a file description and those which don't, but now in a much more readable mechanism - all initialization properties as well as the create static method are grouped to create the FileSystemInitializer structure. Then when we need to initialize an instance, we iterate over a table of these structures, checking for matching structure and then validating the given arguments from userspace against the requirements to ensure we can create a valid instance of the requested filesystem.
This commit is contained in:
parent
4c588441e3
commit
58acdce41f
17 changed files with 72 additions and 88 deletions
|
@ -68,9 +68,9 @@ SysFSRootDirectory::SysFSRootDirectory()
|
|||
m_buses_directory = buses_directory;
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<SysFS>> SysFS::try_create()
|
||||
ErrorOr<NonnullRefPtr<FileSystem>> SysFS::try_create()
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) SysFS);
|
||||
return TRY(adopt_nonnull_ref_or_enomem(new (nothrow) SysFS));
|
||||
}
|
||||
|
||||
SysFS::SysFS() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue