From 2bc9271a9ef6dcec2a349f148600fe4fcf0c0960 Mon Sep 17 00:00:00 2001 From: "Richard J. Knight" Date: Fri, 8 Sep 2017 12:40:20 -0500 Subject: [PATCH] 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/45910 Reviewed-by: Hostboot Team Reviewed-by: Sachin Gupta --- src/import/hwpf/fapi2/tools/parseErrorInfo.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl index 9b74e26de..06b90d108 100755 --- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl @@ -727,7 +727,7 @@ sub addFfdcMethod @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 @@ sub addFfdcMethod # 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"; #----------------------------------------------------------------------