mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-27 17:41:34 +00:00
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>
This commit is contained in:
parent
7bc4f0f883
commit
4e185e8dd7
1 changed files with 16 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue