bsd: attempt to get past socket()
This commit is contained in:
@@ -19,9 +19,27 @@ void BSD_U::RegisterClient(Kernel::HLERequestContext& ctx) {
|
||||
rb.Push<u32>(0);
|
||||
}
|
||||
|
||||
void BSD_U::Socket(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
|
||||
u32 domain = rp.Pop<u32>();
|
||||
u32 type = rp.Pop<u32>();
|
||||
u32 protocol = rp.Pop<u32>();
|
||||
|
||||
LOG_WARNING(Service, "(STUBBED) called domain=%d type=%d protocol=%d", domain, type, protocol);
|
||||
|
||||
u32 fd = next_fd++;
|
||||
|
||||
IPC::RequestBuilder rb{ctx, 3};
|
||||
|
||||
rb.Push<u32>(fd);
|
||||
rb.Push<u32>(0); // bsd errno (no error)
|
||||
}
|
||||
|
||||
BSD_U::BSD_U() : ServiceFramework("bsd:u") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, &BSD_U::RegisterClient, "RegisterClient"}
|
||||
{0, &BSD_U::RegisterClient, "RegisterClient"},
|
||||
{2, &BSD_U::Socket, "Socket"}
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ public:
|
||||
|
||||
private:
|
||||
void RegisterClient(Kernel::HLERequestContext& ctx);
|
||||
void Socket(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/// Id to use for the next open file descriptor.
|
||||
u32 next_fd = 1;
|
||||
};
|
||||
|
||||
} // namespace BSD
|
||||
|
||||
Reference in New Issue
Block a user