mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
binman: Refactor _BuildSectionData()
At present this function does the padding needed around an entry. It is easier to understand what is going on if we have a function that returns the contents of an entry, with padding included. Refactor the code accordingly, adding a new GetPaddedData() method. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -146,7 +146,7 @@ class Image(section.Entry_section):
|
||||
fname = tools.GetOutputFilename(self._filename)
|
||||
tout.Info("Writing image to '%s'" % fname)
|
||||
with open(fname, 'wb') as fd:
|
||||
data = self.GetData()
|
||||
data = self.GetPaddedData()
|
||||
fd.write(data)
|
||||
tout.Info("Wrote %#x bytes" % len(data))
|
||||
|
||||
|
Reference in New Issue
Block a user