diff options
author | Simon Glass <sjg@chromium.org> | 2020-10-26 17:40:21 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-10-29 14:42:59 -0600 |
commit | 93f3c2ea1463f5ad4fff9ada8675078d326db347 (patch) | |
tree | 2bcdb8619fba56b2321cce6d821cc7e022af500f /tools/binman | |
parent | 601b69aa8a56168ff25988bbf9cd2d457f13861d (diff) | |
download | u-boot-93f3c2ea1463f5ad4fff9ada8675078d326db347.zip u-boot-93f3c2ea1463f5ad4fff9ada8675078d326db347.tar.gz u-boot-93f3c2ea1463f5ad4fff9ada8675078d326db347.tar.bz2 |
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>
Diffstat (limited to 'tools/binman')
-rw-r--r-- | tools/binman/etype/section.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index c883f0d..f93469a 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -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""" |