テスト時にゴミが残らないようにnand:/tmp以下を利用するようにした。

テストのリザルトメッセージを心持ち親切にした。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1857 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
aoki_ryoma 2008-07-11 07:35:38 +00:00
parent 60b6dedb8c
commit 38408468ba

View File

@ -18,12 +18,13 @@
#include <twl.h> #include <twl.h>
#include <sysmenu/util_recoveryFile.h> #include <sysmenu/util_recoveryFile.h>
static char *s_strResult[4];
void VBlankIntr(void); void VBlankIntr(void);
void TwlMain( void ) void TwlMain( void )
{ {
char path[] = "nand:/shared2/a/b/c/d/hogehoge.dat"; char path[] = "nand:/tmp/a/b/c/d/hogehoge.dat";
UTL_RecoveryStatus result; UTL_RecoveryStatus result;
OS_Init(); OS_Init();
@ -35,10 +36,11 @@ void TwlMain( void )
GX_VBlankIntr(TRUE); GX_VBlankIntr(TRUE);
// とりあえずファイルサイズに4KB指定 // とりあえずファイルサイズに16byte指定
result = UTL_RecoveryFile( path, 0x1000 ); result = UTL_RecoveryFile( path, 0x0010 );
OS_TPrintf("recovery result: %d\n", result); OS_TPrintf("recovery result: %d\n", result);
OS_TPrintf("%s\n", s_strResult[result] );
OS_TPrintf( "*** End of demo\n" ); OS_TPrintf( "*** End of demo\n" );
OS_Terminate(); OS_Terminate();
@ -49,3 +51,10 @@ void VBlankIntr(void)
{ {
OS_SetIrqCheckFlag(OS_IE_V_BLANK); OS_SetIrqCheckFlag(OS_IE_V_BLANK);
} }
static char *s_strResult[] = {
"Target file exists and file size matched.",
"File size didn't match. Changing size succeeded.",
"Target file didn't exist. Creating file and setting size succeeded.",
"ERROR: File Recovery Failed."
};