summaryrefslogtreecommitdiff
path: root/tools/binman/image.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-26 17:40:12 -0600
committerSimon Glass <sjg@chromium.org>2020-10-29 14:42:59 -0600
commit4a655c9bd7d0e58206ed4417e8da31ad5da4926b (patch)
treeba3e20be270d36107022a20bf7876d3af989e9c0 /tools/binman/image.py
parent17ea9f35e780d073820a770b8e65641761a31d1f (diff)
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>
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r--tools/binman/image.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py
index a8772c3763b..d65ab887b80 100644
--- a/tools/binman/image.py
+++ b/tools/binman/image.py
@@ -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))