mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
fs_wram.c HOTSW_ReadCardDataの返り値をエラー検出に反映
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2383 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
451d10aed5
commit
543acb4ca0
@ -179,6 +179,7 @@ static void FSi_WramThread(void* arg)
|
|||||||
#pragma unused(arg)
|
#pragma unused(arg)
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
CardDataReadState card_read_state;
|
||||||
FSWramCommandParam *cmd;
|
FSWramCommandParam *cmd;
|
||||||
int result;
|
int result;
|
||||||
OS_ReceiveMessage(&FSiWramWork.msgQ4task, (OSMessage*)&cmd, OS_MESSAGE_BLOCK);
|
OS_ReceiveMessage(&FSiWramWork.msgQ4task, (OSMessage*)&cmd, OS_MESSAGE_BLOCK);
|
||||||
@ -195,9 +196,9 @@ static void FSi_WramThread(void* arg)
|
|||||||
result = 0;
|
result = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
HOTSW_ReadCardData( FSiWramWork.card_src, cmd->addr, (u32)cmd->length);
|
card_read_state = HOTSW_ReadCardData( FSiWramWork.card_src, cmd->addr, (u32)cmd->length);
|
||||||
FSiWramWork.card_src = (void *)((u32)FSiWramWork.card_src + (u32)cmd->length);
|
FSiWramWork.card_src = (void *)((u32)FSiWramWork.card_src + (u32)cmd->length);
|
||||||
result = cmd->length;//Žb’è
|
result = (card_read_state == CARD_READ_SUCCESS) ? cmd->length : 0;
|
||||||
break;
|
break;
|
||||||
case FS_WRAM_COMMAND_WRITE:
|
case FS_WRAM_COMMAND_WRITE:
|
||||||
result = FS_WriteFile( FSiWramWork.p_file, cmd->addr, cmd->length );
|
result = FS_WriteFile( FSiWramWork.p_file, cmd->addr, cmd->length );
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user