From: Simon Glass Date: Wed, 25 Sep 2019 14:56:20 +0000 (-0600) Subject: binman: Add a base implementation of Entry.ReadChildData() X-Git-Tag: v2020.10~566^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e185e8dd7aa3ff7618d228ebfaffb507a569c07;p=platform%2Fkernel%2Fu-boot.git 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 Reviewed-by: Bin Meng --- diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 6a2c6e0..f2f1b96 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)