diff options
| author | Simon Glass <[email protected]> | 2019-07-08 14:25:43 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2019-07-24 12:54:08 -0700 |
| commit | 41b8ba090ced0bb54733dc3dd32e945e7e332801 (patch) | |
| tree | ba39478dfacd366f90de71001734414e5efc627f /tools/binman/bsection.py | |
| parent | 8a1ad068deef6228fd501992bdb347ecad9da067 (diff) | |
binman: Allow listing the entries in an image
It is useful to be able to summarise all the entries in an image, e.g. to
display this to this user. Add a new ListEntries() method to Entry, and
set up a way to call it through the Image class.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'tools/binman/bsection.py')
| -rw-r--r-- | tools/binman/bsection.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/binman/bsection.py b/tools/binman/bsection.py index 9047e55a34a..082f424241c 100644 --- a/tools/binman/bsection.py +++ b/tools/binman/bsection.py @@ -10,6 +10,7 @@ from __future__ import print_function from collections import OrderedDict import sys +from entry import Entry import fdt_util import re import state @@ -512,3 +513,11 @@ class Section(object): image size is dynamic and its sections have not yet been packed """ return self._image._size + + def ListEntries(self, entries, indent): + """Override this method to list all files in the section""" + Entry.AddEntryInfo(entries, indent, self._name, 'section', self._size, + self._image_pos, None, self._offset, + self._parent_section) + for entry in self._entries.values(): + entry.ListEntries(entries, indent + 1) |
