mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
アプリロードの途中で死んだ場合にも原因に応じたFATALを設定するように追加変更
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1751 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
f417f93f0b
commit
e9c00251df
@ -739,6 +739,7 @@ static void SYSMi_LoadTitleThreadFunc( TitleProperty *pBootTitle )
|
||||
if( ! bSuccess )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: cant open file\n");
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_OPENFILE_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
@ -769,6 +770,7 @@ OS_TPrintf("RebootSystem failed: cant open file\n");
|
||||
if(!s_calc_hash)
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: Alloc Failed.\n");
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_MEMALLOC_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
@ -784,6 +786,7 @@ OS_TPrintf("RebootSystem failed: Alloc Failed.\n");
|
||||
if( ! bSuccess )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: cant seek file(0)\n");
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_SEEKFILE_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
@ -803,6 +806,7 @@ OS_TPrintf("RebootSystem failed: cant seek file(0)\n");
|
||||
if ( !result )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: cant read file(%d, %d)\n", 0, len);
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_READHEADER_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
}
|
||||
@ -819,6 +823,7 @@ OS_TPrintf("%02X ", header[i * 0x10 + j]);
|
||||
OS_TPrintf("\n");
|
||||
}
|
||||
OS_TPrintf("RebootSystem failed: logo CRC error\n");
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_LOGOCRC_ERROR);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
@ -836,12 +841,14 @@ OS_TPrintf("RebootSystem failed: logo CRC error\n");
|
||||
if( ! bSuccess )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: cant seek file(0)\n");
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_SEEKFILE_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
readLen = FS_ReadFile(file, &s_authcode, (s32)sizeof(s_authcode));
|
||||
if( readLen != (s32)sizeof(s_authcode) )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: cant read file(%p, %d, %d, %d)\n", &s_authcode, 0, sizeof(s_authcode), readLen);
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_READDLSIGN_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
}
|
||||
@ -903,6 +910,7 @@ OS_TPrintf("RebootSystem failed: cant read file(%p, %d, %d, %d)\n", &s_authcode,
|
||||
&(SYSMi_GetWork()->romRelocateInfo[i]), isTwlApp ) )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: ROM Load Region error\n");
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_RELOCATEINFO_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
}
|
||||
@ -928,6 +936,7 @@ OS_TPrintf("RebootSystem failed: cant read file(%p, %d, %d, %d)\n", &s_authcode,
|
||||
if( ! bSuccess )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: cant seek file(%d)\n", source[i]);
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_SEEKFILE_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
@ -984,6 +993,7 @@ OS_TPrintf("RebootSystem : Load VIA WRAM %d.\n", i);
|
||||
if ( !result )
|
||||
{
|
||||
OS_TPrintf("RebootSystem failed: cant read file(%d, %d)\n", source[i], len);
|
||||
UTL_SetFatalError(FATAL_ERROR_LOAD_READMODULE_FAILED);
|
||||
goto ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,7 +92,15 @@ static const char *fatal_error_msg[FATAL_ERROR_MAX] =
|
||||
"TWL_BOOTTYPE_UNKNOWN",
|
||||
"NTR_BOOTTYPE_UNKNOWN",
|
||||
"PLATFORM_UNKNOWN",
|
||||
"LOAD_UNFINISHED"
|
||||
"LOAD_UNFINISHED",
|
||||
"LOAD_OPENFILE_FAILED",
|
||||
"LOAD_MEMALLOC_FAILED",
|
||||
"LOAD_SEEKFILE_FAILED",
|
||||
"LOAD_READHEADER_FAILED",
|
||||
"LOAD_LOGOCRC_ERROR",
|
||||
"LOAD_READDLSIGN_FAILED",
|
||||
"LOAD_RELOCATEINFO_FAILED",
|
||||
"LOAD_READMODULE_FAILED"
|
||||
};
|
||||
|
||||
//#define DEBUG_LAUNCHER_DUMP
|
||||
|
||||
@ -64,8 +64,16 @@ typedef enum FatalErrorCode {
|
||||
FATAL_ERROR_NTR_BOOTTYPE_UNKNOWN = 32,
|
||||
FATAL_ERROR_PLATFORM_UNKNOWN = 33,
|
||||
FATAL_ERROR_LOAD_UNFINISHED = 34,
|
||||
FATAL_ERROR_LOAD_OPENFILE_FAILED = 35,
|
||||
FATAL_ERROR_LOAD_MEMALLOC_FAILED = 36,
|
||||
FATAL_ERROR_LOAD_SEEKFILE_FAILED = 37,
|
||||
FATAL_ERROR_LOAD_READHEADER_FAILED = 38,
|
||||
FATAL_ERROR_LOAD_LOGOCRC_ERROR = 39,
|
||||
FATAL_ERROR_LOAD_READDLSIGN_FAILED = 40,
|
||||
FATAL_ERROR_LOAD_RELOCATEINFO_FAILED = 41,
|
||||
FATAL_ERROR_LOAD_READMODULE_FAILED = 42,
|
||||
|
||||
FATAL_ERROR_MAX = 35
|
||||
FATAL_ERROR_MAX = 43
|
||||
}FatalErrorCode;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user