summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/build/debug/Hostboot/Errl.pm13
-rw-r--r--src/usr/errl/parser/errlparser.C21
2 files changed, 29 insertions, 5 deletions
diff --git a/src/build/debug/Hostboot/Errl.pm b/src/build/debug/Hostboot/Errl.pm
index 88f407f8c..e3484555c 100755
--- a/src/build/debug/Hostboot/Errl.pm
+++ b/src/build/debug/Hostboot/Errl.pm
@@ -6,7 +6,9 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2011,2014
+# Contributors Listed Below - COPYRIGHT 2011,2015
+# [+] International Business Machines Corp.
+#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -48,6 +50,7 @@ sub main
my $listArg = " -l "; # default action is to list
my $displayArg = ""; # for -d <error log id>
my $traceArg = ""; # for the name of the hbot string file
+ my $errlpathArg = ""; # path to errl exe
my %hashh = %{(shift)};
my $temp;
@@ -66,6 +69,10 @@ sub main
{
$traceArg = " -t ".$hashh{$temp};
}
+ elsif( $temp eq "errl" )
+ {
+ $errlpathArg = " -e ".$hashh{$temp};
+ }
elsif( length($temp) eq 0 )
{
; # apparently $temp can be empty
@@ -128,7 +135,7 @@ sub main
my $cmdLine;
- $cmdLine = "$errlParser $tempFile $displayArg $traceArg $listArg";
+ $cmdLine = "$errlParser $tempFile $displayArg $traceArg $listArg $errlpathArg";
# ::userDisplay "$cmdLine\n";
open ERRLPARSER, "$cmdLine |";
while (my $line = <ERRLPARSER>)
@@ -151,6 +158,8 @@ sub helpInfo
options => {
"display=<id>|all" => ["<id> - Display a specific error log by id.",
"all - Display all error logs in the repository."],
+ "trace=<hbotStringFile>" => ["Path to hbotStringFile"],
+ "errl=<errl exe>" => ["Path to errl executable"],
},
notes => ["The default behavior is to list all the committed error logs unless",
"requested to display a specific error log or all error logs."]
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