diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 11:06:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 13:06:05 +0200 |
commit | 47bfbe343bd7e0cc5d841c458fd1f6241acf2a90 (patch) | |
tree | cd3ebc0bfe0f5ab83c4eef66d0823b8d87ba55c7 /Kernel/Syscalls | |
parent | 788b91a65cd8cea0d7a4899c5df1cc8a1c732640 (diff) | |
download | serenity-47bfbe343bd7e0cc5d841c458fd1f6241acf2a90.zip |
Kernel: Tidy up SysFS construction
- Use KResultOr and TRY() to propagate errors
- Check for OOM errors
- Move allocation out of constructors
There's still a lot more to do here, as SysFS is still quite brittle
in the face of memory pressure.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/mount.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/mount.cpp b/Kernel/Syscalls/mount.cpp index e302df3bff..122fd64023 100644 --- a/Kernel/Syscalls/mount.cpp +++ b/Kernel/Syscalls/mount.cpp @@ -85,7 +85,7 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*> } else if (fs_type == "dev"sv || fs_type == "DevFS"sv) { fs = TRY(DevFS::try_create()); } else if (fs_type == "sys"sv || fs_type == "SysFS"sv) { - fs = SysFS::create(); + fs = TRY(SysFS::try_create()); } else if (fs_type == "tmp"sv || fs_type == "TmpFS"sv) { fs = TRY(TmpFS::try_create()); } else if (fs_type == "iso9660"sv || fs_type == "ISO9660FS"sv) { |