mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
フォントとcertがNandに既に存在し、かつROMのデータとベリファイで一致した場合、書き込みをスキップするように変更。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2578 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
b581151c91
commit
f6f5ab0437
@ -70,6 +70,32 @@ BOOL kamiCopyFile(char* srcPath, char* dstPath)
|
|||||||
// ROMファイルクローズ
|
// ROMファイルクローズ
|
||||||
FS_CloseFile(&file);
|
FS_CloseFile(&file);
|
||||||
|
|
||||||
|
// ターゲットファイルオープン
|
||||||
|
FS_InitFile(&file);
|
||||||
|
if (FS_OpenFile(&file, dstPath))
|
||||||
|
{
|
||||||
|
void* pVerifyBuf;
|
||||||
|
|
||||||
|
// NANDファイルリード
|
||||||
|
pVerifyBuf = OS_Alloc( alloc_size );
|
||||||
|
SDK_NULL_ASSERT(pVerifyBuf);
|
||||||
|
DC_InvalidateRange(pVerifyBuf, alloc_size);
|
||||||
|
read_is_ok = FS_ReadFile( &file, pVerifyBuf, (s32)file_size );
|
||||||
|
if (read_is_ok)
|
||||||
|
{
|
||||||
|
DC_FlushRange(pTempBuf, alloc_size);
|
||||||
|
DC_FlushRange(pVerifyBuf, alloc_size);
|
||||||
|
if (!MI_CpuComp8(pTempBuf, pVerifyBuf, file_size))
|
||||||
|
{
|
||||||
|
FS_CloseFile(&file);
|
||||||
|
OS_Free(pTempBuf);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FS_CloseFile(&file);
|
||||||
|
OS_Free(pTempBuf);
|
||||||
|
}
|
||||||
|
|
||||||
// 一旦対象データを削除する
|
// 一旦対象データを削除する
|
||||||
(void)FS_DeleteFile(dstPath);
|
(void)FS_DeleteFile(dstPath);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user