ES: Return ReturnCode in DiVerify for consistency
No reason to return a s32 instead of an IOS return code (like every other function in the ES API)
This commit is contained in:
parent
21d0d6711f
commit
85baca386a
|
@ -612,7 +612,7 @@ IPCCommandResult ES::DIVerify(const IOCtlVRequest& request)
|
||||||
return GetDefaultReply(ES_EINVAL);
|
return GetDefaultReply(ES_EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static s32 WriteTmdForDiVerify(FS::FileSystem* fs, const IOS::ES::TMDReader& tmd)
|
static ReturnCode WriteTmdForDiVerify(FS::FileSystem* fs, const IOS::ES::TMDReader& tmd)
|
||||||
{
|
{
|
||||||
const std::string temp_path = "/tmp/title.tmd";
|
const std::string temp_path = "/tmp/title.tmd";
|
||||||
fs->Delete(PID_KERNEL, PID_KERNEL, temp_path);
|
fs->Delete(PID_KERNEL, PID_KERNEL, temp_path);
|
||||||
|
@ -636,7 +636,7 @@ static s32 WriteTmdForDiVerify(FS::FileSystem* fs, const IOS::ES::TMDReader& tmd
|
||||||
return FS::ConvertResult(fs->Rename(PID_KERNEL, PID_KERNEL, temp_path, tmd_path));
|
return FS::ConvertResult(fs->Rename(PID_KERNEL, PID_KERNEL, temp_path, tmd_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& ticket)
|
ReturnCode ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& ticket)
|
||||||
{
|
{
|
||||||
m_title_context.Clear();
|
m_title_context.Clear();
|
||||||
INFO_LOG(IOS_ES, "ES_DIVerify: Title context changed: (none)");
|
INFO_LOG(IOS_ES, "ES_DIVerify: Title context changed: (none)");
|
||||||
|
@ -656,7 +656,7 @@ s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& tic
|
||||||
const auto fs = m_ios.GetFS();
|
const auto fs = m_ios.GetFS();
|
||||||
if (!FindInstalledTMD(tmd.GetTitleId()).IsValid())
|
if (!FindInstalledTMD(tmd.GetTitleId()).IsValid())
|
||||||
{
|
{
|
||||||
if (const s32 ret = WriteTmdForDiVerify(fs.get(), tmd))
|
if (const ReturnCode ret = WriteTmdForDiVerify(fs.get(), tmd))
|
||||||
{
|
{
|
||||||
ERROR_LOG(IOS_ES, "DiVerify failed to write disc TMD to NAND.");
|
ERROR_LOG(IOS_ES, "DiVerify failed to write disc TMD to NAND.");
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -37,7 +37,7 @@ class ES final : public Device
|
||||||
public:
|
public:
|
||||||
ES(Kernel& ios, const std::string& device_name);
|
ES(Kernel& ios, const std::string& device_name);
|
||||||
|
|
||||||
s32 DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& ticket);
|
ReturnCode DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& ticket);
|
||||||
bool LaunchTitle(u64 title_id, bool skip_reload = false);
|
bool LaunchTitle(u64 title_id, bool skip_reload = false);
|
||||||
|
|
||||||
void DoState(PointerWrap& p) override;
|
void DoState(PointerWrap& p) override;
|
||||||
|
|
Loading…
Reference in New Issue