mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
NAND 2KBバグ回避コードの削除
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@281 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
7b7a3f0265
commit
e92723051d
@ -290,7 +290,7 @@ BOOL FATFS_LoadBuffer(u32 offset, u32 size)
|
|||||||
profile[pf_cnt++] = (u32)OS_TicksToMicroSeconds(OS_GetTick());
|
profile[pf_cnt++] = (u32)OS_TicksToMicroSeconds(OS_GetTick());
|
||||||
#endif
|
#endif
|
||||||
//OS_TPrintf("po_read(dest=%p, unit=0x%x);\n", dest, unit);
|
//OS_TPrintf("po_read(dest=%p, unit=0x%x);\n", dest, unit);
|
||||||
#if 0 /* 0: 2KBバグパッチ */
|
#if 1 /* 0: 2KBバグパッチ */
|
||||||
if (po_read(menu_fd, (u8*)dest, (int)unit) < 0) // reading
|
if (po_read(menu_fd, (u8*)dest, (int)unit) < 0) // reading
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
#include <firm.h>
|
#include <firm.h>
|
||||||
#include <rtfs.h>
|
#include <rtfs.h>
|
||||||
|
|
||||||
#define WORKAROUND_NAND_2KB_BUG
|
//#define WORKAROUND_NAND_2KB_BUG
|
||||||
|
|
||||||
#define FS_HEADER_AUTH_SIZE 0xe00
|
#define FS_HEADER_AUTH_SIZE 0xe00
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ BOOL FS_LoadBuffer( int fd, u32 offset, u32 size )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
// seek
|
// seek
|
||||||
if ( FATFSi_rtfs_po_lseek(fd, (s32)offset, PSEEK_SET) < 0 )
|
if ( FATFSi_rtfs_po_lseek(fd, (long)offset, PSEEK_SET) != (long)offset )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -204,14 +204,14 @@ BOOL FS_LoadBuffer( int fd, u32 offset, u32 size )
|
|||||||
{
|
{
|
||||||
u8* d = dest + done;
|
u8* d = dest + done;
|
||||||
u32 u = unit - done < 2048 ? unit - done : 2048;
|
u32 u = unit - done < 2048 ? unit - done : 2048;
|
||||||
if ( FATFSi_rtfs_po_read(fd, (u8*)d, (int)u) < 0 )
|
if ( FATFSi_rtfs_po_read(fd, (u8*)d, (int)u) != (int)u )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if ( FATFSi_rtfs_po_read(fd, (u8*)dest, (int)unit) < 0 )
|
if ( FATFSi_rtfs_po_read(fd, (u8*)dest, (int)unit) != (int)unit )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user