1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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 <sjg@chromium.org>
This commit is contained in:
Simon Glass
2019-07-08 14:25:43 -06:00
parent 8a1ad068de
commit 41b8ba090c
7 changed files with 174 additions and 1 deletions

View File

@@ -162,3 +162,13 @@ class Image:
file=fd)
self._section.WriteMap(fd, 0)
return fname
def BuildEntryList(self):
"""List the files in an image
Returns:
List of entry.EntryInfo objects describing all entries in the image
"""
entries = []
self._section.ListEntries(entries, 0)
return entries