diff options
author | Brian Horton <brianh@linux.ibm.com> | 2013-05-01 15:50:48 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-05-06 15:29:46 -0500 |
commit | 76503bffd0fa23e3d81f1b4f6a208ffcfa380f57 (patch) | |
tree | 07b75403bb13c1de4333fb02fc518659715764ff /src/usr/targeting/common | |
parent | a11977819c36bdc208ea400c2701c9982b0a84d2 (diff) | |
download | talos-hostboot-76503bffd0fa23e3d81f1b4f6a208ffcfa380f57.tar.gz talos-hostboot-76503bffd0fa23e3d81f1b4f6a208ffcfa380f57.zip |
fix issue with errludattribute parser function
errludattribute parser function had incorrect values for the
attributes (enum value, not the hash) so the errl parser output
was incorrect - all showed up as 'unknown attribute'.
Change-Id: Ic68dc92fb7105a5b29895ecc37d2e01f0525155f
RTC: 70803
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4313
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Van H. Lee <vanlee@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common')
-rwxr-xr-x | src/usr/targeting/common/xmltohb/xmltohb.pl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 2924e0437..f0db364f8 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -1905,10 +1905,20 @@ sub writeAttrErrlHFile { print $outFile "\n"; print $outFile " switch (attrEnum) {\n"; + my $attributeIdEnum = getAttributeIdEnumeration($attributes); + # loop through every attribute to make the swith/case foreach my $attribute (@{$attributes->{attribute}}) { - my $attrVal = sprintf "0x%08X", $attribute->{value}; + my $attrVal; + foreach my $enum (@{$attributeIdEnum->{enumerator}}) + { + if ($enum->{name} eq $attribute->{id}) + { + $attrVal = $enum->{value}; + last; # don't need to look at any others. + } + } print $outFile " case ",$attrVal,": {\n"; # things we'll skip: |