mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +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:
@@ -12,9 +12,9 @@
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
ErrorOr<NonnullRefPtr<DevPtsFS>> DevPtsFS::try_create()
|
||||
ErrorOr<NonnullRefPtr<FileSystem>> DevPtsFS::try_create()
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) DevPtsFS);
|
||||
return TRY(adopt_nonnull_ref_or_enomem(new (nothrow) DevPtsFS));
|
||||
}
|
||||
|
||||
DevPtsFS::DevPtsFS() = default;
|
||||
|
||||
Reference in New Issue
Block a user