From d4504402b1a9eda36c029f639e0fce5cffde0ec9 Mon Sep 17 00:00:00 2001 From: "Richard J. Knight" Date: Fri, 8 Sep 2017 12:40:20 -0500 Subject: multiple collectFfdc tags results in dupicate code -Updated parser to eliminate multiple calls when there are more than on collectFfdc tag in the hwpError section Change-Id: I04b485d7d232d65d9ba02add03d8ac0901872c7f RTC:179620 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45904 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: AMIT J. TENDOLKAR Reviewed-by: Prem Shanker Jha Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45911 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- src/import/hwpf/fapi2/tools/parseErrorInfo.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/import/hwpf') diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl index 67da0a679..768a8b101 100755 --- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl @@ -727,7 +727,7 @@ foreach my $argnum ( 0 .. $#ARGV ) @elements[$i] =~ s/^\s+|\s+$//g; addFfdcMethod( \%methods, @elements[$i], $err->{rc}, $ffdc_type, $objNum ); - $collectFfdc .= "@elements[$i]" + $collectFfdc .= "@elements[$i]"; } @@ -751,11 +751,13 @@ foreach my $argnum ( 0 .. $#ARGV ) # assign the tempRc with newly added ffdc back to the passed in RC $collectFfdcStr .= "\tRC = tempRc; \\\n"; - - print EIFILE "\\\n{ \\\n$collectFfdcStr \\\n}"; - } #end collectFfdc tag + if ( defined $collectFfdcStr ) + { + print EIFILE "\\\n{ \\\n$collectFfdcStr}"; + } + print EIFILE "\n"; #---------------------------------------------------------------------- -- cgit v1.2.1