diff mbox series

[U-Boot,036/126] binman: Add a base implementation of Entry.ReadChildData()

Message ID 20190925145750.200592-37-sjg@chromium.org
State Accepted
Commit 4e185e8dd7aa3ff7618d228ebfaffb507a569c07
Delegated to: Bin Meng
Headers show
Series x86: Add initial support for apollolake | expand

Commit Message

Simon Glass Sept. 25, 2019, 2:56 p.m. UTC
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>
---

 tools/binman/entry.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Bin Meng Oct. 5, 2019, 2:41 p.m. UTC | #1
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
>
> 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>
> ---
>
>  tools/binman/entry.py | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng Oct. 6, 2019, 11:20 a.m. UTC | #2
On Sat, Oct 5, 2019 at 10:41 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > 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>
> > ---
> >
> >  tools/binman/entry.py | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86/next, thanks!
diff mbox series

Patch

diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 04c26f9e505..0e82065c291 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -720,6 +720,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)