]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Add a base implementation of Entry.ReadChildData()
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:56:20 +0000 (08:56 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:43 +0000 (13:57 +0800)
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>
tools/binman/entry.py

index 6a2c6e0d92e5b0cb0fff2dcce436490f4e2cbc9f..f2f1b967a4d70fcefc8d3a636f53c22c241f28d6 100644 (file)
@@ -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)