diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 10:42:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 13:06:05 +0200 |
commit | efe4e230ee60b16356359220d749b96c65a4ed6f (patch) | |
tree | 5b6c35489f3627ecbab835aa4ec42c9918819591 /Kernel/Syscalls | |
parent | cbc4c98a87f8fbc01626957402596f45ab91b725 (diff) | |
download | serenity-efe4e230ee60b16356359220d749b96c65a4ed6f.zip |
Kernel: Tidy up DevPtsFS construction and handle OOM errors
- Use KResultOr and TRY() to propagate errors
- Check for OOM when creating new inodes
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 8e2472dae2..c8f219bf5b 100644 --- a/Kernel/Syscalls/mount.cpp +++ b/Kernel/Syscalls/mount.cpp @@ -81,7 +81,7 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*> } else if (fs_type == "proc"sv || fs_type == "ProcFS"sv) { fs = TRY(ProcFS::try_create()); } else if (fs_type == "devpts"sv || fs_type == "DevPtsFS"sv) { - fs = DevPtsFS::create(); + fs = TRY(DevPtsFS::try_create()); } else if (fs_type == "dev"sv || fs_type == "DevFS"sv) { fs = DevFS::create(); } else if (fs_type == "sys"sv || fs_type == "SysFS"sv) { |