Skip to content

Commit

Permalink
Update WOF errl parser to allow for padding
Browse files Browse the repository at this point in the history
Noticed padding to 4-byte boundaries which
throws off this error log parsing.
Parsing updated to just output the expected entries
and ignore the additional padding.

Change-Id: I238a1466919005069a36cc9c61b3d3f5f7b02278
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69405
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mderkse1 authored and dcrowell77 committed Jan 3, 2019
1 parent 3a99295 commit b014251
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/usr/errl/plugins/errludwofdata.H
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ public:
tableEntries = actualTableCount; // don't go over buffer length
}

// Check that the remaining data breaks down into parsable
// wofTableCompareData_t entries
if ( (i_buflen - sizeof(tableEntries))
% sizeof(wofTableCompareData_t) == 0 )
// Verify the buffer contains at least the specified number of entries
if ( (i_buflen - sizeof(tableEntries) -
tableEntries * sizeof(wofTableCompareData_t)) >= 0 )
{
i_parser.PrintString("---------------------------------------",
"---------------------------------------");
Expand Down Expand Up @@ -185,7 +184,9 @@ public:
}
else
{
i_parser.PrintString("Unable to parse too small buffer","");
i_parser.PrintNumber("WOF Buffer length", "0x%X", i_buflen);
i_parser.PrintNumber("Total entry count", "0x%X", tableEntries);
i_parser.PrintString("Expected buffer format:",
"uint16_t count, match this entry, unmatched entries");
i_parser.PrintNumber("Each entry size", "%d",
Expand Down

0 comments on commit b014251

Please sign in to comment.