summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:56:20 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:57:43 +0800
commit4e185e8dd7aa3ff7618d228ebfaffb507a569c07 (patch)
tree6f189b6065447809bdb2e3a31363040fbd3474ef /tools
parent7bc4f0f88327bcd3c2daafe969f049dcfab41b00 (diff)
binman: Add a base implementation of Entry.ReadChildData()
At present this function is not present in the Entry base class so it is hard to find the documentation for it. Move the docs from the section class and expand it a little. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/entry.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 6a2c6e0d92..f2f1b967a4 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -717,6 +717,22 @@ features to produce new behaviours.
data = self.section.ReadChildData(self, decomp)
return data
+ def ReadChildData(self, child, decomp=True):
+ """Read the data for a particular child
+
+ This reads data from the parent and extracts the piece that relates to
+ the given child.
+
+ Args:
+ child: Child to read (must be valid)
+ decomp: True to decompress any compressed data before returning it;
+ False to return the raw, uncompressed data
+
+ Returns:
+ Data for the child (bytes)
+ """
+ pass
+
def LoadData(self, decomp=True):
data = self.ReadData(decomp)
self.contents_size = len(data)