diff options
author | Mike Jones <mjjones@us.ibm.com> | 2012-05-15 12:23:52 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-05-21 09:48:20 -0500 |
commit | a32430814a0f190f08102d776b886656060c8509 (patch) | |
tree | 474d426ac5deed8c97db6e5a56ebe8ad7a7e2959 /src/usr/hwpf/fapi/fapiParseErrorInfo.pl | |
parent | 2a98222faf80705d4de4ed5703166802cdacc491 (diff) | |
download | talos-hostboot-a32430814a0f190f08102d776b886656060c8509.tar.gz talos-hostboot-a32430814a0f190f08102d776b886656060c8509.zip |
HWPF: Add error checking to FAPI perl scripts and output ULL to 64bit enumerators
John Farrugia requested these changes:
fapiParseAttributeInfo.pl:
- Detect duplicate attribute ID
- Add 'ULL' to the end of 64 bit enumerators
fapiParseErrorInfo.pl
- Detect duplicate error RCs
Change-Id: I862ca9b4f37dc83026f7fcdc26676bbf724656a1
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1062
Tested-by: Jenkins Server
Reviewed-by: Van H. Lee <vanlee@us.ibm.com>
Reviewed-by: CAMVAN T. NGUYEN <ctnguyen@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/fapi/fapiParseErrorInfo.pl')
-rwxr-xr-x | src/usr/hwpf/fapi/fapiParseErrorInfo.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl index 87a4cd12d..02f3354b1 100755 --- a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl +++ b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl @@ -46,6 +46,7 @@ # mjjones 12/16/11 Improved usage statement # mjjones 02/10/12 Allow err file with one element # mjjones 03/22/12 Generate hash values for enums +# mjjones 05/15/12 Detect duplicate error rcs # # End Change Log ****************************************************** @@ -176,6 +177,7 @@ foreach my $argnum (1 .. $#ARGV) my $infile = $ARGV[$argnum]; my $count = 0; my %enumHash; + my %errorRcHash; #-------------------------------------------------------------------------- # Read XML file. The ForceArray option ensures that there is an array of @@ -201,6 +203,16 @@ foreach my $argnum (1 .. $#ARGV) exit(1); } + if (exists($errorRcHash{$err->{rc}})) + { + # Two different errors with the same rc! + print ("fapiParseErrorInfo.pl ERROR. Duplicate error rc ", + $err->{rc}, "\n"); + exit(1); + } + + $errorRcHash{$err->{rc}} = 1; + if (! exists $err->{description}) { print ("fapiParseErrorInfo.pl ERROR. description missing\n"); |