binman: Call CheckSize() from the section's Pack() method

At present CheckSize() is called from the function that packs the entries.
Move it up to the main Pack() function so that _PackEntries() can just
do the packing.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-10-26 17:40:21 -06:00
parent 601b69aa8a
commit 93f3c2ea14

View File

@@ -264,6 +264,9 @@ class Entry_section(Entry):
self._SortEntries()
self._ExpandEntries()
size = self.CheckSize()
self.size = size
return super().Pack(offset)
def _PackEntries(self):
@@ -271,7 +274,7 @@ class Entry_section(Entry):
offset = self._skip_at_start
for entry in self._entries.values():
offset = entry.Pack(offset)
self.size = self.CheckSize()
return offset
def _ExpandEntries(self):
"""Expand any entries that are permitted to"""