Explorar o código

Kernel: Rename LocalSocket::create_connected_pair() => try_*()

Andreas Kling %!s(int64=3) %!d(string=hai) anos
pai
achega
48a1a3c0ce
Modificáronse 3 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      Kernel/Net/LocalSocket.cpp
  2. 1 1
      Kernel/Net/LocalSocket.h
  3. 1 1
      Kernel/Syscalls/socket.cpp

+ 1 - 1
Kernel/Net/LocalSocket.cpp

@@ -48,7 +48,7 @@ KResultOr<NonnullRefPtr<LocalSocket>> LocalSocket::try_create(int type)
     return ENOMEM;
 }
 
-KResultOr<SocketPair> LocalSocket::create_connected_pair(int type)
+KResultOr<SocketPair> LocalSocket::try_create_connected_pair(int type)
 {
     auto socket_or_error = LocalSocket::try_create(type);
     if (socket_or_error.is_error())

+ 1 - 1
Kernel/Net/LocalSocket.h

@@ -23,7 +23,7 @@ class LocalSocket final : public Socket {
 
 public:
     static KResultOr<NonnullRefPtr<LocalSocket>> try_create(int type);
-    static KResultOr<SocketPair> create_connected_pair(int type);
+    static KResultOr<SocketPair> try_create_connected_pair(int type);
     virtual ~LocalSocket() override;
 
     KResult sendfd(const FileDescription& socket_description, FileDescription& passing_description);

+ 1 - 1
Kernel/Syscalls/socket.cpp

@@ -406,7 +406,7 @@ KResultOr<FlatPtr> Process::sys$socketpair(Userspace<const Syscall::SC_socketpai
     if (params.protocol != 0 && params.protocol != PF_LOCAL)
         return EINVAL;
 
-    auto result = LocalSocket::create_connected_pair(params.type & SOCK_TYPE_MASK);
+    auto result = LocalSocket::try_create_connected_pair(params.type & SOCK_TYPE_MASK);
     if (result.is_error())
         return result.error();
     auto pair = result.value();