diff options
author | Brian Horton <brianh@linux.ibm.com> | 2013-04-20 09:30:56 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-04-29 09:46:48 -0500 |
commit | 8730c6ffd8a6a3874feb493ba9660f6c5eec8f87 (patch) | |
tree | 6eb7d43ae6f3cf5814622283ecc69ff9a841392e /src/usr/targeting/common/xmltohb/xmltohb.pl | |
parent | 6cf6fb00b04853ec686ed72ba249a39383dfe106 (diff) | |
download | talos-hostboot-8730c6ffd8a6a3874feb493ba9660f6c5eec8f87.tar.gz talos-hostboot-8730c6ffd8a6a3874feb493ba9660f6c5eec8f87.zip |
fix bug in errludtarget parser code
Change-Id: Ia5f7f0dccbb9370f580db919a26a8007beb4c938
RTC: 69936
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4134
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/xmltohb/xmltohb.pl')
-rwxr-xr-x | src/usr/targeting/common/xmltohb/xmltohb.pl | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index e7583a32b..64cb4ee74 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -2465,19 +2465,37 @@ sub writeTargetErrlHFile { print $outFile " // 2 Entity Paths next\n"; print $outFile " for (uint32_t k = 0;k < 2; k++)\n"; print $outFile " {\n"; + + my $attrPhysPath; + my $attrAffinityPath; + + # need the attribute id's for ATTR_PHYS_PATH and ATTR_AFFINITY_PATH: + my $attributeIdEnumeration = getAttributeIdEnumeration($attributes); + foreach my $enumerator (@{$attributeIdEnumeration->{enumerator}}) + { + if ($enumerator->{name} eq "PHYS_PATH") + { + $attrPhysPath = $enumerator->{value}; + } + elsif ($enumerator->{name} eq "AFFINITY_PATH") + { + $attrAffinityPath = $enumerator->{value}; + } + } + print $outFile " uint32_t l_pathType = ntohl(*l_ptr32);\n"; - print $outFile " if ((l_pathType == 0x15) || // ATTR_PHYS_PATH\n"; - print $outFile " (l_pathType == 0x16)) // ATTR_AFFINITY_PATH\n"; + print $outFile " if ((l_pathType == $attrPhysPath) || // ATTR_PHYS_PATH\n"; + print $outFile " (l_pathType == $attrAffinityPath)) // ATTR_AFFINITY_PATH\n"; print $outFile " {\n"; print $outFile " l_ptr32++;\n"; print $outFile " uint8_t *l_ptr = reinterpret_cast<uint8_t *>(l_ptr32);\n"; print $outFile " char outString[128];\n"; print $outFile " l_ptr = errlud_parse_entity_path(l_ptr,outString);\n"; - print $outFile " if (l_pathType == 0x15)\n"; + print $outFile " if (l_pathType == $attrPhysPath)\n"; print $outFile " {\n"; print $outFile " i_parser.PrintString(\" ATTR_PHYS_PATH\", outString);\n"; print $outFile " }\n"; - print $outFile " if (l_pathType == 0x16)\n"; + print $outFile " if (l_pathType == $attrAffinityPath)\n"; print $outFile " {\n"; print $outFile " i_parser.PrintString(\" ATTR_AFFINITY_PATH\", outString);\n"; print $outFile " } // else don't print anything\n"; |