From 87b2a11270a6ee843a3c24b389ad5a9158f31911 Mon Sep 17 00:00:00 2001 From: aoki_ryoma Date: Fri, 4 Jul 2008 00:00:42 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E3=82=A8=E3=83=B3=E3=83=88=E3=83=AA=E6=95=B0?= =?UTF-8?q?=E3=80=81=E5=90=88=E8=A8=88=E3=82=B5=E3=82=A4=E3=82=BA=E3=82=92?= =?UTF-8?q?=E5=87=BA=E5=8A=9B=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/branches/20080626_SDK500fc_plus5_branch@1775 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/tests/ErrorLogTest/ARM9/src/ErrorLogTest.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/build/tests/ErrorLogTest/ARM9/src/ErrorLogTest.c b/build/tests/ErrorLogTest/ARM9/src/ErrorLogTest.c index e2a38c99..519c94ae 100644 --- a/build/tests/ErrorLogTest/ARM9/src/ErrorLogTest.c +++ b/build/tests/ErrorLogTest/ARM9/src/ErrorLogTest.c @@ -11,8 +11,8 @@ in whole or in part, without the prior written consent of Nintendo. $Date:: $ - $Rev:$ - $Author:$ + $Rev$ + $Author$ *---------------------------------------------------------------------------*/ #include @@ -21,7 +21,7 @@ // なぜかバッファサイズが256byteを超えると出力が欠けるようになる // ダンプを見ると、OS_TPrintf()呼び出し時にもバッファにはちゃんと格納されている模様 // 原因は現在調査中 -#define BUFSIZE 250 +#define BUFSIZE 128 void VBlankIntr(void); @@ -60,17 +60,25 @@ void TwlMain( void ) // ログファイルの中身を出力 FSFile file; char buf[BUFSIZE+1]; + int numEntry = 0; + int totalSize = 0, nowSize = 0; buf[BUFSIZE] = '\0'; FS_InitFile( &file ); FS_OpenFileEx( &file, "nand:/sys/log/sysmenu.log", FS_FILEMODE_R ); - while( FS_ReadFile( &file, buf, BUFSIZE ) == BUFSIZE ) + while( ( nowSize = FS_ReadFile( &file, buf, BUFSIZE ) ) == BUFSIZE ) { OS_TPrintf("%s",buf); + numEntry++; + totalSize += nowSize; } OS_TPrintf("%s\n",buf); + totalSize += nowSize; + + OS_TPrintf("num entry : %d\n", numEntry ); + OS_TPrintf("total Size : %d\n", totalSize); } OS_TPrintf( "*** End of demo\n" );