summaryrefslogtreecommitdiff
path: root/src/core/hle/service/sockets
diff options
context:
space:
mode:
authorGravatar Morph2021-05-21 01:05:04 -0400
committerGravatar Morph2021-06-02 00:39:27 -0400
commit12c1766997f2596b4b1b1a6a411e4f6d56605ee7 (patch)
treee718a0f18be8aaf664ebdcd197af513e5a118b72 /src/core/hle/service/sockets
parentMerge pull request #6395 from lioncash/result-move (diff)
downloadyuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar.gz
yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar.xz
yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.zip
general: Replace RESULT_SUCCESS with ResultSuccess
Transition to PascalCase for result names.
Diffstat (limited to 'src/core/hle/service/sockets')
-rw-r--r--src/core/hle/service/sockets/bsd.cpp32
-rw-r--r--src/core/hle/service/sockets/sfdnsres.cpp2
2 files changed, 17 insertions, 17 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index 5fcd91f68..7d85ecb6a 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -47,7 +47,7 @@ void BSD::PollWork::Response(Kernel::HLERequestContext& ctx) {
47 } 47 }
48 48
49 IPC::ResponseBuilder rb{ctx, 4}; 49 IPC::ResponseBuilder rb{ctx, 4};
50 rb.Push(RESULT_SUCCESS); 50 rb.Push(ResultSuccess);
51 rb.Push<s32>(ret); 51 rb.Push<s32>(ret);
52 rb.PushEnum(bsd_errno); 52 rb.PushEnum(bsd_errno);
53} 53}
@@ -62,7 +62,7 @@ void BSD::AcceptWork::Response(Kernel::HLERequestContext& ctx) {
62 } 62 }
63 63
64 IPC::ResponseBuilder rb{ctx, 5}; 64 IPC::ResponseBuilder rb{ctx, 5};
65 rb.Push(RESULT_SUCCESS); 65 rb.Push(ResultSuccess);
66 rb.Push<s32>(ret); 66 rb.Push<s32>(ret);
67 rb.PushEnum(bsd_errno); 67 rb.PushEnum(bsd_errno);
68 rb.Push<u32>(static_cast<u32>(write_buffer.size())); 68 rb.Push<u32>(static_cast<u32>(write_buffer.size()));
@@ -74,7 +74,7 @@ void BSD::ConnectWork::Execute(BSD* bsd) {
74 74
75void BSD::ConnectWork::Response(Kernel::HLERequestContext& ctx) { 75void BSD::ConnectWork::Response(Kernel::HLERequestContext& ctx) {
76 IPC::ResponseBuilder rb{ctx, 4}; 76 IPC::ResponseBuilder rb{ctx, 4};
77 rb.Push(RESULT_SUCCESS); 77 rb.Push(ResultSuccess);
78 rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1); 78 rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1);
79 rb.PushEnum(bsd_errno); 79 rb.PushEnum(bsd_errno);
80} 80}
@@ -87,7 +87,7 @@ void BSD::RecvWork::Response(Kernel::HLERequestContext& ctx) {
87 ctx.WriteBuffer(message); 87 ctx.WriteBuffer(message);
88 88
89 IPC::ResponseBuilder rb{ctx, 4}; 89 IPC::ResponseBuilder rb{ctx, 4};
90 rb.Push(RESULT_SUCCESS); 90 rb.Push(ResultSuccess);
91 rb.Push<s32>(ret); 91 rb.Push<s32>(ret);
92 rb.PushEnum(bsd_errno); 92 rb.PushEnum(bsd_errno);
93} 93}
@@ -103,7 +103,7 @@ void BSD::RecvFromWork::Response(Kernel::HLERequestContext& ctx) {
103 } 103 }
104 104
105 IPC::ResponseBuilder rb{ctx, 5}; 105 IPC::ResponseBuilder rb{ctx, 5};
106 rb.Push(RESULT_SUCCESS); 106 rb.Push(ResultSuccess);
107 rb.Push<s32>(ret); 107 rb.Push<s32>(ret);
108 rb.PushEnum(bsd_errno); 108 rb.PushEnum(bsd_errno);
109 rb.Push<u32>(static_cast<u32>(addr.size())); 109 rb.Push<u32>(static_cast<u32>(addr.size()));
@@ -115,7 +115,7 @@ void BSD::SendWork::Execute(BSD* bsd) {
115 115
116void BSD::SendWork::Response(Kernel::HLERequestContext& ctx) { 116void BSD::SendWork::Response(Kernel::HLERequestContext& ctx) {
117 IPC::ResponseBuilder rb{ctx, 4}; 117 IPC::ResponseBuilder rb{ctx, 4};
118 rb.Push(RESULT_SUCCESS); 118 rb.Push(ResultSuccess);
119 rb.Push<s32>(ret); 119 rb.Push<s32>(ret);
120 rb.PushEnum(bsd_errno); 120 rb.PushEnum(bsd_errno);
121} 121}
@@ -126,7 +126,7 @@ void BSD::SendToWork::Execute(BSD* bsd) {
126 126
127void BSD::SendToWork::Response(Kernel::HLERequestContext& ctx) { 127void BSD::SendToWork::Response(Kernel::HLERequestContext& ctx) {
128 IPC::ResponseBuilder rb{ctx, 4}; 128 IPC::ResponseBuilder rb{ctx, 4};
129 rb.Push(RESULT_SUCCESS); 129 rb.Push(ResultSuccess);
130 rb.Push<s32>(ret); 130 rb.Push<s32>(ret);
131 rb.PushEnum(bsd_errno); 131 rb.PushEnum(bsd_errno);
132} 132}
@@ -136,7 +136,7 @@ void BSD::RegisterClient(Kernel::HLERequestContext& ctx) {
136 136
137 IPC::ResponseBuilder rb{ctx, 3}; 137 IPC::ResponseBuilder rb{ctx, 3};
138 138
139 rb.Push(RESULT_SUCCESS); 139 rb.Push(ResultSuccess);
140 rb.Push<s32>(0); // bsd errno 140 rb.Push<s32>(0); // bsd errno
141} 141}
142 142
@@ -145,7 +145,7 @@ void BSD::StartMonitoring(Kernel::HLERequestContext& ctx) {
145 145
146 IPC::ResponseBuilder rb{ctx, 2}; 146 IPC::ResponseBuilder rb{ctx, 2};
147 147
148 rb.Push(RESULT_SUCCESS); 148 rb.Push(ResultSuccess);
149} 149}
150 150
151void BSD::Socket(Kernel::HLERequestContext& ctx) { 151void BSD::Socket(Kernel::HLERequestContext& ctx) {
@@ -160,7 +160,7 @@ void BSD::Socket(Kernel::HLERequestContext& ctx) {
160 static_cast<Protocol>(protocol)); 160 static_cast<Protocol>(protocol));
161 161
162 IPC::ResponseBuilder rb{ctx, 4}; 162 IPC::ResponseBuilder rb{ctx, 4};
163 rb.Push(RESULT_SUCCESS); 163 rb.Push(ResultSuccess);
164 rb.Push<s32>(fd); 164 rb.Push<s32>(fd);
165 rb.PushEnum(bsd_errno); 165 rb.PushEnum(bsd_errno);
166} 166}
@@ -170,7 +170,7 @@ void BSD::Select(Kernel::HLERequestContext& ctx) {
170 170
171 IPC::ResponseBuilder rb{ctx, 4}; 171 IPC::ResponseBuilder rb{ctx, 4};
172 172
173 rb.Push(RESULT_SUCCESS); 173 rb.Push(ResultSuccess);
174 rb.Push<u32>(0); // ret 174 rb.Push<u32>(0); // ret
175 rb.Push<u32>(0); // bsd errno 175 rb.Push<u32>(0); // bsd errno
176} 176}
@@ -235,7 +235,7 @@ void BSD::GetPeerName(Kernel::HLERequestContext& ctx) {
235 ctx.WriteBuffer(write_buffer); 235 ctx.WriteBuffer(write_buffer);
236 236
237 IPC::ResponseBuilder rb{ctx, 5}; 237 IPC::ResponseBuilder rb{ctx, 5};
238 rb.Push(RESULT_SUCCESS); 238 rb.Push(ResultSuccess);
239 rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0); 239 rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0);
240 rb.PushEnum(bsd_errno); 240 rb.PushEnum(bsd_errno);
241 rb.Push<u32>(static_cast<u32>(write_buffer.size())); 241 rb.Push<u32>(static_cast<u32>(write_buffer.size()));
@@ -253,7 +253,7 @@ void BSD::GetSockName(Kernel::HLERequestContext& ctx) {
253 ctx.WriteBuffer(write_buffer); 253 ctx.WriteBuffer(write_buffer);
254 254
255 IPC::ResponseBuilder rb{ctx, 5}; 255 IPC::ResponseBuilder rb{ctx, 5};
256 rb.Push(RESULT_SUCCESS); 256 rb.Push(ResultSuccess);
257 rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0); 257 rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0);
258 rb.PushEnum(bsd_errno); 258 rb.PushEnum(bsd_errno);
259 rb.Push<u32>(static_cast<u32>(write_buffer.size())); 259 rb.Push<u32>(static_cast<u32>(write_buffer.size()));
@@ -272,7 +272,7 @@ void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) {
272 ctx.WriteBuffer(optval); 272 ctx.WriteBuffer(optval);
273 273
274 IPC::ResponseBuilder rb{ctx, 5}; 274 IPC::ResponseBuilder rb{ctx, 5};
275 rb.Push(RESULT_SUCCESS); 275 rb.Push(ResultSuccess);
276 rb.Push<s32>(-1); 276 rb.Push<s32>(-1);
277 rb.PushEnum(Errno::NOTCONN); 277 rb.PushEnum(Errno::NOTCONN);
278 rb.Push<u32>(static_cast<u32>(optval.size())); 278 rb.Push<u32>(static_cast<u32>(optval.size()));
@@ -299,7 +299,7 @@ void BSD::Fcntl(Kernel::HLERequestContext& ctx) {
299 const auto [ret, bsd_errno] = FcntlImpl(fd, static_cast<FcntlCmd>(cmd), arg); 299 const auto [ret, bsd_errno] = FcntlImpl(fd, static_cast<FcntlCmd>(cmd), arg);
300 300
301 IPC::ResponseBuilder rb{ctx, 4}; 301 IPC::ResponseBuilder rb{ctx, 4};
302 rb.Push(RESULT_SUCCESS); 302 rb.Push(ResultSuccess);
303 rb.Push<s32>(ret); 303 rb.Push<s32>(ret);
304 rb.PushEnum(bsd_errno); 304 rb.PushEnum(bsd_errno);
305} 305}
@@ -822,7 +822,7 @@ bool BSD::IsFileDescriptorValid(s32 fd) const noexcept {
822void BSD::BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) const noexcept { 822void BSD::BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) const noexcept {
823 IPC::ResponseBuilder rb{ctx, 4}; 823 IPC::ResponseBuilder rb{ctx, 4};
824 824
825 rb.Push(RESULT_SUCCESS); 825 rb.Push(ResultSuccess);
826 rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1); 826 rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1);
827 rb.PushEnum(bsd_errno); 827 rb.PushEnum(bsd_errno);
828} 828}
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp
index 5c71f423c..fb6142c49 100644
--- a/src/core/hle/service/sockets/sfdnsres.cpp
+++ b/src/core/hle/service/sockets/sfdnsres.cpp
@@ -46,7 +46,7 @@ void SFDNSRES::GetAddrInfoRequest(Kernel::HLERequestContext& ctx) {
46 parameters.use_nsd_resolve, parameters.unknown, parameters.process_id); 46 parameters.use_nsd_resolve, parameters.unknown, parameters.process_id);
47 47
48 IPC::ResponseBuilder rb{ctx, 2}; 48 IPC::ResponseBuilder rb{ctx, 2};
49 rb.Push(RESULT_SUCCESS); 49 rb.Push(ResultSuccess);
50} 50}
51 51
52} // namespace Service::Sockets 52} // namespace Service::Sockets