IOS HLE: Set return value to EINVAL for unknown commands
This matches IOS behaviour and allows getting rid of command handlers which merely set the return value to EINVAL.
This commit is contained in:
parent
45b59f01b8
commit
c761ac4f08
|
@ -81,30 +81,35 @@ IPCCommandResult IWII_IPC_HLE_Device::Close(u32 command_address, bool force)
|
||||||
IPCCommandResult IWII_IPC_HLE_Device::Seek(u32 command_address)
|
IPCCommandResult IWII_IPC_HLE_Device::Seek(u32 command_address)
|
||||||
{
|
{
|
||||||
WARN_LOG(WII_IPC_HLE, "%s does not support Seek()", m_name.c_str());
|
WARN_LOG(WII_IPC_HLE, "%s does not support Seek()", m_name.c_str());
|
||||||
|
Memory::Write_U32(IPC_EINVAL, command_address);
|
||||||
return GetDefaultReply();
|
return GetDefaultReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCCommandResult IWII_IPC_HLE_Device::Read(u32 command_address)
|
IPCCommandResult IWII_IPC_HLE_Device::Read(u32 command_address)
|
||||||
{
|
{
|
||||||
WARN_LOG(WII_IPC_HLE, "%s does not support Read()", m_name.c_str());
|
WARN_LOG(WII_IPC_HLE, "%s does not support Read()", m_name.c_str());
|
||||||
|
Memory::Write_U32(IPC_EINVAL, command_address);
|
||||||
return GetDefaultReply();
|
return GetDefaultReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCCommandResult IWII_IPC_HLE_Device::Write(u32 command_address)
|
IPCCommandResult IWII_IPC_HLE_Device::Write(u32 command_address)
|
||||||
{
|
{
|
||||||
WARN_LOG(WII_IPC_HLE, "%s does not support Write()", m_name.c_str());
|
WARN_LOG(WII_IPC_HLE, "%s does not support Write()", m_name.c_str());
|
||||||
|
Memory::Write_U32(IPC_EINVAL, command_address);
|
||||||
return GetDefaultReply();
|
return GetDefaultReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCCommandResult IWII_IPC_HLE_Device::IOCtl(u32 command_address)
|
IPCCommandResult IWII_IPC_HLE_Device::IOCtl(u32 command_address)
|
||||||
{
|
{
|
||||||
WARN_LOG(WII_IPC_HLE, "%s does not support IOCtl()", m_name.c_str());
|
WARN_LOG(WII_IPC_HLE, "%s does not support IOCtl()", m_name.c_str());
|
||||||
|
Memory::Write_U32(IPC_EINVAL, command_address);
|
||||||
return GetDefaultReply();
|
return GetDefaultReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCCommandResult IWII_IPC_HLE_Device::IOCtlV(u32 command_address)
|
IPCCommandResult IWII_IPC_HLE_Device::IOCtlV(u32 command_address)
|
||||||
{
|
{
|
||||||
WARN_LOG(WII_IPC_HLE, "%s does not support IOCtlV()", m_name.c_str());
|
WARN_LOG(WII_IPC_HLE, "%s does not support IOCtlV()", m_name.c_str());
|
||||||
|
Memory::Write_U32(IPC_EINVAL, command_address);
|
||||||
return GetDefaultReply();
|
return GetDefaultReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,14 +50,6 @@ void RestoreBTInfoSection(SysConf* sysconf)
|
||||||
File::Delete(filename);
|
File::Delete(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_base::IOCtl(u32 command_address)
|
|
||||||
{
|
|
||||||
// NeoGamma (homebrew) is known to use this path.
|
|
||||||
ERROR_LOG(WII_IPC_WIIMOTE, "Bad IOCtl to /dev/usb/oh1/57e/305");
|
|
||||||
Memory::Write_U32(IPC_EINVAL, command_address + 4);
|
|
||||||
return GetDefaultReply();
|
|
||||||
}
|
|
||||||
|
|
||||||
CWII_IPC_HLE_Device_usb_oh1_57e_305_base::CtrlMessage::CtrlMessage(const SIOCtlVBuffer& cmd_buffer)
|
CWII_IPC_HLE_Device_usb_oh1_57e_305_base::CtrlMessage::CtrlMessage(const SIOCtlVBuffer& cmd_buffer)
|
||||||
{
|
{
|
||||||
request_type = Memory::Read_U8(cmd_buffer.InBuffer[0].m_Address);
|
request_type = Memory::Read_U8(cmd_buffer.InBuffer[0].m_Address);
|
||||||
|
|
|
@ -28,7 +28,6 @@ public:
|
||||||
|
|
||||||
virtual IPCCommandResult Open(u32 command_address, u32 mode) override = 0;
|
virtual IPCCommandResult Open(u32 command_address, u32 mode) override = 0;
|
||||||
virtual IPCCommandResult Close(u32 command_address, bool force) override = 0;
|
virtual IPCCommandResult Close(u32 command_address, bool force) override = 0;
|
||||||
IPCCommandResult IOCtl(u32 command_address) override;
|
|
||||||
virtual IPCCommandResult IOCtlV(u32 command_address) override = 0;
|
virtual IPCCommandResult IOCtlV(u32 command_address) override = 0;
|
||||||
|
|
||||||
virtual void DoState(PointerWrap& p) override = 0;
|
virtual void DoState(PointerWrap& p) override = 0;
|
||||||
|
|
|
@ -172,14 +172,6 @@ IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::Close(u32 _CommandAddr
|
||||||
return GetDefaultReply();
|
return GetDefaultReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IOCtl(u32 _CommandAddress)
|
|
||||||
{
|
|
||||||
// NeoGamma (homebrew) is known to use this path.
|
|
||||||
ERROR_LOG(WII_IPC_WIIMOTE, "Bad IOCtl in CWII_IPC_HLE_Device_usb_oh1_57e_305");
|
|
||||||
Memory::Write_U32(IPC_EINVAL, _CommandAddress + 4);
|
|
||||||
return GetDefaultReply();
|
|
||||||
}
|
|
||||||
|
|
||||||
IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IOCtlV(u32 _CommandAddress)
|
IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IOCtlV(u32 _CommandAddress)
|
||||||
{
|
{
|
||||||
bool _SendReply = false;
|
bool _SendReply = false;
|
||||||
|
|
|
@ -47,7 +47,6 @@ public:
|
||||||
IPCCommandResult Close(u32 _CommandAddress, bool _bForce) override;
|
IPCCommandResult Close(u32 _CommandAddress, bool _bForce) override;
|
||||||
|
|
||||||
IPCCommandResult IOCtlV(u32 _CommandAddress) override;
|
IPCCommandResult IOCtlV(u32 _CommandAddress) override;
|
||||||
IPCCommandResult IOCtl(u32 _CommandAddress) override;
|
|
||||||
|
|
||||||
u32 Update() override;
|
u32 Update() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue