diff options
| author | CamVan Nguyen <ctnguyen@us.ibm.com> | 2011-09-14 10:35:31 -0500 |
|---|---|---|
| committer | CAMVAN T. NGUYEN <ctnguyen@us.ibm.com> | 2011-09-14 17:36:44 -0500 |
| commit | 3447d024f2d28912e894fe7f94281a645a7d4568 (patch) | |
| tree | 0229e5bbd162be615e39725e2e7e4b378b1931c8 /src/usr/errl/parser | |
| parent | 4dd7fda6921996b76bca7f03210416669e8b779d (diff) | |
| download | blackbird-hostboot-3447d024f2d28912e894fe7f94281a645a7d4568.tar.gz blackbird-hostboot-3447d024f2d28912e894fe7f94281a645a7d4568.zip | |
Added function to dump and parse error logs to hostboot dump and parse tools.
Added new tools hb-trace, hb-errl, hb-printk, hb-dump for vbu/vpo debug.
Added support for ecmd options, more error checking and misc enhancements.
Change-Id: I8f5ed666a1d99ff894015e07a20595fcac8727b5
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/343
Tested-by: Jenkins Server
Reviewed-by: CAMVAN T. NGUYEN <ctnguyen@us.ibm.com>
Diffstat (limited to 'src/usr/errl/parser')
| -rw-r--r-- | src/usr/errl/parser/errlparser.C | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/usr/errl/parser/errlparser.C b/src/usr/errl/parser/errlparser.C index 684dbf2a7..127080f5f 100644 --- a/src/usr/errl/parser/errlparser.C +++ b/src/usr/errl/parser/errlparser.C @@ -48,7 +48,7 @@ using namespace ERRORLOG; #define USAGE "\ Usage:\n\ \n\ -errlparser [-i] <imagefile> [[-s] <symsfile>] [-l | -d <logid>] [-v]\n\ +errlparser [-i] <imagefile> [[-s] <symsfile>] [-l | -d [<logid>|all]] [-v]\n\ \n\ Arguments:\n\ <imagefile> data file name\n\ @@ -575,6 +575,7 @@ int main( int argc, char *argv[] ) int fVerbose = 0; int fList = 1; int fDetail = 0; + int fAll = 0; int fFound = 0; @@ -598,15 +599,23 @@ int main( int argc, char *argv[] ) i++; if( i >= argc ) { - fprintf( stdout, "Provide -d <logid>\n" ); - exit( 2 ); + // nothing after -d + fAll = 1; } - int c = sscanf( argv[i], "%d", &ulLogId ); - if( c != 1 ) + else if( 0 == strcmp( argv[i], "all" )) { - fprintf( stdout, "Provide -d <decimal log ID>\n" ); - exit( 2 ); + fAll = 1; + } + else + { + int c = sscanf( argv[i], "%d", &ulLogId ); + if( c != 1 ) + { + fprintf( stdout, "Provide -d <decimal log ID>\n" ); + exit( 2 ); + } } + fList = 0; fDetail = 1; } @@ -774,7 +783,7 @@ int main( int argc, char *argv[] ) printf( "%s\n", szDivider ); PrintErrlSummary( perr ); } - else if(( fDetail ) && ( perr->logId == ulLogId )) + else if(( fDetail ) && (( perr->logId == ulLogId ) || (fAll))) { // Print the detail for the one error log. printf( "%s\n", szDivider ); |

