1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

Kernel: Tidy up TmpFS and TmpFSInode construction

- Use KResultOr<NonnullRefPtr<T>>
- Propagate errors
- Use TRY() at call sites
This commit is contained in:
Andreas Kling 2021-09-06 02:28:38 +02:00
parent 5e61382849
commit a8516681b7
3 changed files with 15 additions and 22 deletions

View file

@ -87,7 +87,7 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*>
} else if (fs_type == "sys"sv || fs_type == "SysFS"sv) {
fs = SysFS::create();
} else if (fs_type == "tmp"sv || fs_type == "TmpFS"sv) {
fs = TmpFS::create();
fs = TRY(TmpFS::try_create());
} else if (fs_type == "iso9660"sv || fs_type == "ISO9660FS"sv) {
if (description_or_error.is_error())
return EBADF;