diff options
author | bunnei <bunneidev@gmail.com> | 2021-01-29 01:28:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 01:28:11 +0100 |
commit | df41e78205b6c3e212674a274bf1d4b0ed002a0c (patch) | |
tree | f495bb4a819a37184a03a991bfdb94075e475dba /src/core/hle | |
parent | Merge pull request #5831 from MerryMage/isb (diff) | |
parent | Stub GetSockOpt (diff) | |
download | yuzu-df41e78205b6c3e212674a274bf1d4b0ed002a0c.tar yuzu-df41e78205b6c3e212674a274bf1d4b0ed002a0c.tar.gz yuzu-df41e78205b6c3e212674a274bf1d4b0ed002a0c.tar.bz2 yuzu-df41e78205b6c3e212674a274bf1d4b0ed002a0c.tar.lz yuzu-df41e78205b6c3e212674a274bf1d4b0ed002a0c.tar.xz yuzu-df41e78205b6c3e212674a274bf1d4b0ed002a0c.tar.zst yuzu-df41e78205b6c3e212674a274bf1d4b0ed002a0c.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 17 | ||||
-rw-r--r-- | src/core/hle/service/sockets/bsd.h | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 2b824059d..d85df6af1 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -255,6 +255,21 @@ void BSD::GetSockName(Kernel::HLERequestContext& ctx) { rb.Push<u32>(static_cast<u32>(write_buffer.size())); } +void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const s32 fd = rp.Pop<s32>(); + const u32 level = rp.Pop<u32>(); + const auto optname = static_cast<OptName>(rp.Pop<u32>()); + + LOG_WARNING(Service, "(STUBBED) called. fd={} level={} optname=0x{:x}", fd, level, optname); + + IPC::ResponseBuilder rb{ctx, 5}; + rb.Push(RESULT_SUCCESS); + rb.Push<s32>(-1); + rb.PushEnum(Errno::NOTCONN); + rb.Push<u32>(0); +} + void BSD::Listen(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const s32 fd = rp.Pop<s32>(); @@ -812,7 +827,7 @@ BSD::BSD(Core::System& system_, const char* name) : ServiceFramework{system_, na {14, &BSD::Connect, "Connect"}, {15, &BSD::GetPeerName, "GetPeerName"}, {16, &BSD::GetSockName, "GetSockName"}, - {17, nullptr, "GetSockOpt"}, + {17, &BSD::GetSockOpt, "GetSockOpt"}, {18, &BSD::Listen, "Listen"}, {19, nullptr, "Ioctl"}, {20, &BSD::Fcntl, "Fcntl"}, diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index 6da0bfeb2..f5831dd48 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h @@ -125,6 +125,7 @@ private: void Connect(Kernel::HLERequestContext& ctx); void GetPeerName(Kernel::HLERequestContext& ctx); void GetSockName(Kernel::HLERequestContext& ctx); + void GetSockOpt(Kernel::HLERequestContext& ctx); void Listen(Kernel::HLERequestContext& ctx); void Fcntl(Kernel::HLERequestContext& ctx); void SetSockOpt(Kernel::HLERequestContext& ctx); |