mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-10-04 20:21:35 +02:00
binman: Move sort and expand to the main Pack() function
At present sorting and expanding entries are side-effects of the CheckEntries() function. This is a bit confusing, as 'checking' would not normally involve making changes. Move these steps into the Pack() function instead. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6ddd61131f
commit
c1af7a86b3
@ -260,6 +260,10 @@ class Entry_section(Entry):
|
|||||||
def Pack(self, offset):
|
def Pack(self, offset):
|
||||||
"""Pack all entries into the section"""
|
"""Pack all entries into the section"""
|
||||||
self._PackEntries()
|
self._PackEntries()
|
||||||
|
if self._sort:
|
||||||
|
self._SortEntries()
|
||||||
|
self._ExpandEntries()
|
||||||
|
|
||||||
return super().Pack(offset)
|
return super().Pack(offset)
|
||||||
|
|
||||||
def _PackEntries(self):
|
def _PackEntries(self):
|
||||||
@ -290,9 +294,6 @@ class Entry_section(Entry):
|
|||||||
|
|
||||||
def CheckEntries(self):
|
def CheckEntries(self):
|
||||||
"""Check that entries do not overlap or extend outside the section"""
|
"""Check that entries do not overlap or extend outside the section"""
|
||||||
if self._sort:
|
|
||||||
self._SortEntries()
|
|
||||||
self._ExpandEntries()
|
|
||||||
offset = 0
|
offset = 0
|
||||||
prev_name = 'None'
|
prev_name = 'None'
|
||||||
for entry in self._entries.values():
|
for entry in self._entries.values():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user