aboutsummaryrefslogtreecommitdiff
path: root/tools/binman
diff options
context:
space:
mode:
authorPaul Barker <paul.barker@sancloud.com>2021-09-08 12:38:01 +0100
committerTom Rini <trini@konsulko.com>2021-09-24 14:30:46 -0400
commit5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9 (patch)
treeeabe72bc1f7e2fc848616999485161ace286f71a /tools/binman
parent15e30106ce624ade62ba87c2defe7ea67c88f1b5 (diff)
downloadu-boot-5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9.zip
u-boot-5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9.tar.gz
u-boot-5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9.tar.bz2
tools: Refactor full help printing
Collect the code for printing the full help message of patman, buildman and binman into a single function in patman.tools. Signed-off-by: Paul Barker <paul.barker@sancloud.com>
Diffstat (limited to 'tools/binman')
-rw-r--r--tools/binman/control.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index dcba02f..0dbcbc2 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -565,12 +565,9 @@ def Binman(args):
global state
if args.full_help:
- pager = os.getenv('PAGER')
- if not pager:
- pager = 'more'
- fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
- 'README.rst')
- command.Run(pager, fname)
+ tools.PrintFullHelp(
+ os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README.rst')
+ )
return 0
# Put these here so that we can import this module without libfdt