IOS/SO: Use an enum for result codes
This commit is contained in:
parent
32d51f1699
commit
393663a0a3
|
@ -59,6 +59,12 @@ namespace HLE
|
||||||
{
|
{
|
||||||
namespace Device
|
namespace Device
|
||||||
{
|
{
|
||||||
|
enum SOResultCode : s32
|
||||||
|
{
|
||||||
|
SO_ERROR_INVALID_REQUEST = -51,
|
||||||
|
SO_ERROR_HOST_NOT_FOUND = -305,
|
||||||
|
};
|
||||||
|
|
||||||
NetIPTop::NetIPTop(Kernel& ios, const std::string& device_name) : Device(ios, device_name)
|
NetIPTop::NetIPTop(Kernel& ios, const std::string& device_name) : Device(ios, device_name)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -771,7 +777,7 @@ IPCCommandResult NetIPTop::HandleGetInterfaceOptRequest(const IOCtlVRequest& req
|
||||||
if (param != 0xfffe)
|
if (param != 0xfffe)
|
||||||
{
|
{
|
||||||
WARN_LOG(IOS_NET, "GetInterfaceOpt: received invalid request with param0=%08x", param);
|
WARN_LOG(IOS_NET, "GetInterfaceOpt: received invalid request with param0=%08x", param);
|
||||||
return GetDefaultReply(-51);
|
return GetDefaultReply(SO_ERROR_INVALID_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.io_vectors[0].size >= 8)
|
if (request.io_vectors[0].size >= 8)
|
||||||
|
@ -1022,8 +1028,7 @@ IPCCommandResult NetIPTop::HandleGetAddressInfoRequest(const IOCtlVRequest& requ
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Host not found
|
ret = SO_ERROR_HOST_NOT_FOUND;
|
||||||
ret = -305;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
request.Dump(GetDeviceName(), LogTypes::IOS_NET, LogTypes::LINFO);
|
request.Dump(GetDeviceName(), LogTypes::IOS_NET, LogTypes::LINFO);
|
||||||
|
|
Loading…
Reference in New Issue