summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/parser
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2015-04-30 08:09:01 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-05-06 22:16:10 -0500
commit1bb0f18f747e2e1a4ede9df16eac2ca340c72552 (patch)
treed6abaf662509acd24f82f3c6b17e9be8bd6e1345 /src/usr/errl/parser
parentc646754e720b5cd21534425ca90bb414a4a3ff12 (diff)
downloadtalos-hostboot-1bb0f18f747e2e1a4ede9df16eac2ca340c72552.tar.gz
talos-hostboot-1bb0f18f747e2e1a4ede9df16eac2ca340c72552.zip
Add parm to specify location of errl executable for debug tools
Change-Id: I44ec7b2ae03259351cccd67b50a41c3cd8a6a190 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17543 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: MATTHEW A. PLOETZ <maploetz@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/parser')
-rw-r--r--src/usr/errl/parser/errlparser.C21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/usr/errl/parser/errlparser.C b/src/usr/errl/parser/errlparser.C
index 67a9bbf03..6dacfc244 100644
--- a/src/usr/errl/parser/errlparser.C
+++ b/src/usr/errl/parser/errlparser.C
@@ -73,7 +73,7 @@ using namespace ERRORLOG;
#define USAGE "\
Usage:\n\
\n\
-errlparser [-i]<image> [[-s]<syms>] [-l|-d[<logid>|all]] [-t <stringfile>]\n\
+errlparser [-i]<image> [[-s]<syms>] [-l|-d[<logid>|all]] [-t <stringfile>] [-e <errl exe>]\n\
\n\
Arguments:\n\
<image> data file name\n\
@@ -83,6 +83,7 @@ Arguments:\n\
-i name explicitly name the image file\n\
-s name explicitly name the symbols file\n\
-t name name the hbotStringFile\n\
+ -e file full path to errl binary\n\
-v verbose output to stdout\n\
\n\
Sample command lines:\n\
@@ -704,6 +705,16 @@ int main( int argc, char *argv[] )
// help
halt( USAGE );
}
+ else if( 0 == strcmp( "-e", argv[i] ))
+ {
+ i++;
+ if( i >= argc )
+ {
+ fprintf( stdout, "Provide -e <errl exe>\n" );
+ exit( 2 );
+ }
+ pszErrlTool = strdup( argv[i] );
+ }
else if( 0 == strcmp( "-", argv[i] ))
{
// unrecognized switch
@@ -748,14 +759,18 @@ int main( int argc, char *argv[] )
}
// There is a copy of FSP x86 errl tool in the simics dir.
- pszErrlTool = "./errl";
+ if( (pszErrlTool == NULL)
+ || (-1 == stat( pszErrlTool, &statbuffer )) )
+ {
+ pszErrlTool = "./errl";
+ }
rc = stat( pszErrlTool, &statbuffer );
if( -1 == rc )
{
// Not found, so this one should be found for most users.
pszErrlTool =
- "/esw/fips730/Builds/b0829a_1130.730/obj/x86.nfp/errl/nfp/tool/errl";
+ "/esw/fips830/Builds/built/obj/x86.nfp/errl/nfp/tool/errl";
rc = stat( pszErrlTool, &statbuffer );
if( -1 == rc )
OpenPOWER on IntegriCloud