Merge pull request #3346 from bunnei/bsd-stub

bsd: Stub several more functions.
This commit is contained in:
bunnei 2020-01-27 13:06:05 -05:00 committed by GitHub
commit acfb0b4852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 4 deletions

View File

@ -42,6 +42,26 @@ void BSD::Socket(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(0); // bsd errno rb.Push<u32>(0); // bsd errno
} }
void BSD::Select(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // ret
rb.Push<u32>(0); // bsd errno
}
void BSD::Bind(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // ret
rb.Push<u32>(0); // bsd errno
}
void BSD::Connect(Kernel::HLERequestContext& ctx) { void BSD::Connect(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called"); LOG_WARNING(Service, "(STUBBED) called");
@ -52,6 +72,26 @@ void BSD::Connect(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(0); // bsd errno rb.Push<u32>(0); // bsd errno
} }
void BSD::Listen(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // ret
rb.Push<u32>(0); // bsd errno
}
void BSD::SetSockOpt(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // ret
rb.Push<u32>(0); // bsd errno
}
void BSD::SendTo(Kernel::HLERequestContext& ctx) { void BSD::SendTo(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called"); LOG_WARNING(Service, "(STUBBED) called");
@ -80,7 +120,7 @@ BSD::BSD(const char* name) : ServiceFramework(name) {
{2, &BSD::Socket, "Socket"}, {2, &BSD::Socket, "Socket"},
{3, nullptr, "SocketExempt"}, {3, nullptr, "SocketExempt"},
{4, nullptr, "Open"}, {4, nullptr, "Open"},
{5, nullptr, "Select"}, {5, &BSD::Select, "Select"},
{6, nullptr, "Poll"}, {6, nullptr, "Poll"},
{7, nullptr, "Sysctl"}, {7, nullptr, "Sysctl"},
{8, nullptr, "Recv"}, {8, nullptr, "Recv"},
@ -88,15 +128,15 @@ BSD::BSD(const char* name) : ServiceFramework(name) {
{10, nullptr, "Send"}, {10, nullptr, "Send"},
{11, &BSD::SendTo, "SendTo"}, {11, &BSD::SendTo, "SendTo"},
{12, nullptr, "Accept"}, {12, nullptr, "Accept"},
{13, nullptr, "Bind"}, {13, &BSD::Bind, "Bind"},
{14, &BSD::Connect, "Connect"}, {14, &BSD::Connect, "Connect"},
{15, nullptr, "GetPeerName"}, {15, nullptr, "GetPeerName"},
{16, nullptr, "GetSockName"}, {16, nullptr, "GetSockName"},
{17, nullptr, "GetSockOpt"}, {17, nullptr, "GetSockOpt"},
{18, nullptr, "Listen"}, {18, &BSD::Listen, "Listen"},
{19, nullptr, "Ioctl"}, {19, nullptr, "Ioctl"},
{20, nullptr, "Fcntl"}, {20, nullptr, "Fcntl"},
{21, nullptr, "SetSockOpt"}, {21, &BSD::SetSockOpt, "SetSockOpt"},
{22, nullptr, "Shutdown"}, {22, nullptr, "Shutdown"},
{23, nullptr, "ShutdownAllSockets"}, {23, nullptr, "ShutdownAllSockets"},
{24, nullptr, "Write"}, {24, nullptr, "Write"},

View File

@ -18,7 +18,11 @@ private:
void RegisterClient(Kernel::HLERequestContext& ctx); void RegisterClient(Kernel::HLERequestContext& ctx);
void StartMonitoring(Kernel::HLERequestContext& ctx); void StartMonitoring(Kernel::HLERequestContext& ctx);
void Socket(Kernel::HLERequestContext& ctx); void Socket(Kernel::HLERequestContext& ctx);
void Select(Kernel::HLERequestContext& ctx);
void Bind(Kernel::HLERequestContext& ctx);
void Connect(Kernel::HLERequestContext& ctx); void Connect(Kernel::HLERequestContext& ctx);
void Listen(Kernel::HLERequestContext& ctx);
void SetSockOpt(Kernel::HLERequestContext& ctx);
void SendTo(Kernel::HLERequestContext& ctx); void SendTo(Kernel::HLERequestContext& ctx);
void Close(Kernel::HLERequestContext& ctx); void Close(Kernel::HLERequestContext& ctx);