diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2023-07-18 20:34:39 +0000 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-08-02 12:05:57 -0600 |
commit | 8f452bc557e7e8bd0d2f82663fdca1a180c75a9f (patch) | |
tree | a3c421b2ce88e9133f07c12c163dbe8bc6fd9820 /tools/binman/control.py | |
parent | c2600155afcbb0160fc468ee7055fd61d82f3cf0 (diff) |
binman: Show filename in missing blob help message
Show the filename next to the node path in missing blob help messages,
also show a generic missing blob message when there was no help message
for the help tag.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r-- | tools/binman/control.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py index 94abea5c38..2aa6307750 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -112,8 +112,8 @@ def _ReadMissingBlobHelp(): _FinishTag(tag, msg, result) return result -def _ShowBlobHelp(level, path, text): - tout.do_output(level, '%s:' % path) +def _ShowBlobHelp(level, path, text, fname): + tout.do_output(level, '%s (%s):' % (path, fname)) for line in text.splitlines(): tout.do_output(level, ' %s' % line) tout.do_output(level, '') @@ -133,10 +133,17 @@ def _ShowHelpForMissingBlobs(level, missing_list): tags = entry.GetHelpTags() # Show the first match help message + shown_help = False for tag in tags: if tag in missing_blob_help: - _ShowBlobHelp(level, entry._node.path, missing_blob_help[tag]) + _ShowBlobHelp(level, entry._node.path, missing_blob_help[tag], + entry.GetDefaultFilename()) + shown_help = True break + # Or a generic help message + if not shown_help: + _ShowBlobHelp(level, entry._node.path, "Missing blob", + entry.GetDefaultFilename()) def GetEntryModules(include_testing=True): """Get a set of entry class implementations |