diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-28 21:25:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-29 01:09:19 +0200 |
commit | 59335bd8eaf7c4f11bb5a9ab96373dfe8eca0893 (patch) | |
tree | 12dd819aad4fcbdff12098c093615e58062cd06a /Kernel/Syscalls | |
parent | 31bc9565f8a4afa5abfa3d50f4b02cdc697f26b1 (diff) | |
download | serenity-59335bd8eaf7c4f11bb5a9ab96373dfe8eca0893.zip |
Kernel: Rename FileDescription::create() => try_create()
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/anon_create.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/inode_watcher.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/socket.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Syscalls/anon_create.cpp b/Kernel/Syscalls/anon_create.cpp index 4ea569c973..ecbaa7e313 100644 --- a/Kernel/Syscalls/anon_create.cpp +++ b/Kernel/Syscalls/anon_create.cpp @@ -36,7 +36,7 @@ KResultOr<FlatPtr> Process::sys$anon_create(size_t size, int options) auto anon_file = AnonymousFile::create(maybe_vmobject.release_value()); if (!anon_file) return ENOMEM; - auto description_or_error = FileDescription::create(*anon_file); + auto description_or_error = FileDescription::try_create(*anon_file); if (description_or_error.is_error()) return description_or_error.error(); diff --git a/Kernel/Syscalls/inode_watcher.cpp b/Kernel/Syscalls/inode_watcher.cpp index 32498cc876..f4b42d5b14 100644 --- a/Kernel/Syscalls/inode_watcher.cpp +++ b/Kernel/Syscalls/inode_watcher.cpp @@ -27,7 +27,7 @@ KResultOr<FlatPtr> Process::sys$create_inode_watcher(u32 flags) if (watcher_or_error.is_error()) return watcher_or_error.error(); - auto description_or_error = FileDescription::create(*watcher_or_error.value()); + auto description_or_error = FileDescription::try_create(*watcher_or_error.value()); if (description_or_error.is_error()) return description_or_error.error(); diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp index 5af6b526ce..0988a04153 100644 --- a/Kernel/Syscalls/socket.cpp +++ b/Kernel/Syscalls/socket.cpp @@ -45,7 +45,7 @@ KResultOr<FlatPtr> Process::sys$socket(int domain, int type, int protocol) auto result = Socket::create(domain, type, protocol); if (result.is_error()) return result.error(); - auto description_result = FileDescription::create(*result.value()); + auto description_result = FileDescription::try_create(*result.value()); if (description_result.is_error()) return description_result.error(); setup_socket_fd(socket_fd.fd, description_result.value(), type); @@ -133,7 +133,7 @@ KResultOr<FlatPtr> Process::sys$accept4(Userspace<const Syscall::SC_accept4_para return EFAULT; } - auto accepted_socket_description_result = FileDescription::create(*accepted_socket); + auto accepted_socket_description_result = FileDescription::try_create(*accepted_socket); if (accepted_socket_description_result.is_error()) return accepted_socket_description_result.error(); |