diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 10:47:47 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 13:06:05 +0200 |
commit | 788b91a65cd8cea0d7a4899c5df1cc8a1c732640 (patch) | |
tree | 42f087b22ca401faa3801b1c0970f0ba18db1d13 /Kernel/Syscalls/mount.cpp | |
parent | efe4e230ee60b16356359220d749b96c65a4ed6f (diff) | |
download | serenity-788b91a65cd8cea0d7a4899c5df1cc8a1c732640.zip |
Kernel: Tidy up DevFS construction and handle OOM errorso
- Use KResultOr and TRY() to propagate errors
- Check for OOM
- Move allocations out of the DevFS constructor
Diffstat (limited to 'Kernel/Syscalls/mount.cpp')
-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 c8f219bf5b..e302df3bff 100644 --- a/Kernel/Syscalls/mount.cpp +++ b/Kernel/Syscalls/mount.cpp @@ -83,7 +83,7 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*> } else if (fs_type == "devpts"sv || fs_type == "DevPtsFS"sv) { fs = TRY(DevPtsFS::try_create()); } else if (fs_type == "dev"sv || fs_type == "DevFS"sv) { - fs = DevFS::create(); + fs = TRY(DevFS::try_create()); } else if (fs_type == "sys"sv || fs_type == "SysFS"sv) { fs = SysFS::create(); } else if (fs_type == "tmp"sv || fs_type == "TmpFS"sv) { |