PEL: Add function to get PEL size
Add a size() function to the PEL class that adds up the size fields
in the header of every PEL section.
This required a fix to some testcases where the size field was wrong in
a header.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0d70deae116cd3835f2c0ab34e13811da471fb14
diff --git a/test/openpower-pels/src_test.cpp b/test/openpower-pels/src_test.cpp
index 2749c37..c1b5116 100644
--- a/test/openpower-pels/src_test.cpp
+++ b/test/openpower-pels/src_test.cpp
@@ -30,7 +30,7 @@
EXPECT_TRUE(src.valid());
EXPECT_EQ(src.header().id, 0x5053);
- EXPECT_EQ(src.header().size, 0x80);
+ EXPECT_EQ(src.header().size, 0x50);
EXPECT_EQ(src.header().version, 0x01);
EXPECT_EQ(src.header().subType, 0x01);
EXPECT_EQ(src.header().componentID, 0x0202);