summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/parser
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2014-11-07 15:34:54 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-11-13 08:52:31 -0600
commit5c9e8309715c863c3d24263fc38efa53462f59b0 (patch)
tree2a8bc9196af8f858982bcdfb3845d9406b9e10a3 /src/usr/errl/parser
parentfe139a1a90d8bd381b63ad54bc7fda9d71ebd3e0 (diff)
downloadtalos-hostboot-5c9e8309715c863c3d24263fc38efa53462f59b0.tar.gz
talos-hostboot-5c9e8309715c863c3d24263fc38efa53462f59b0.zip
Fix errldisplay errorInfo hex string compare to be numeric
This will fix those "unknown" strings in the errldisplay Change-Id: Id231948fc7d235e427cbbbe88d3c4477109e239b Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14405 Tested-by: Jenkins Server Reviewed-by: ANDRES A. LUGO-REYES <aalugore@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/parser')
-rwxr-xr-xsrc/usr/errl/parser/genErrlParsers.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl
index e246e1a8a..fde5799a5 100755
--- a/src/usr/errl/parser/genErrlParsers.pl
+++ b/src/usr/errl/parser/genErrlParsers.pl
@@ -1058,6 +1058,14 @@ $outputFileName = $outputDir . "/../errldisplaydata.C";
open(OFILE, ">", $outputFileName . ".tmp") or
die("Cannot open: $outputFileName.tmp: $!");
+#------------------------------------------------------------------------------
+# Helper function for sort method, convert hex string to decimal and compare
+#------------------------------------------------------------------------------
+sub hexToDecCmp
+{
+ hex($a) <=> hex($b);
+}
+
print OFILE "/*\n";
print OFILE " * Automatically generated by Hostboot's $0\n";
print OFILE " * Do not modify this file in the hostboot tree, it is automatically\n";
@@ -1071,9 +1079,9 @@ print OFILE "#include <stdlib.h>\n\n";
print OFILE "namespace ERRORLOGDISPLAY\n{\n\n";
print OFILE "// Error Info Table\n";
print OFILE "ErrLogDisplay::errLogInfo ErrLogDisplay::errorInfo [] = {\n";
-foreach my $modID (sort keys %displayDataEntries)
+foreach my $modID (sort hexToDecCmp keys(%displayDataEntries))
{
- foreach my $rc (sort keys %{$displayDataEntries{$modID}})
+ foreach my $rc (sort hexToDecCmp keys(%{$displayDataEntries{$modID}}))
{
print OFILE $displayDataEntries{$modID}{$rc};
}
OpenPOWER on IntegriCloud