binman: bintool: parametrize args to pass to binary for returning version
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Thu, 1 Sep 2022 15:51:40 +0000 (17:51 +0200)
committerSimon Glass <sjg@chromium.org>
Thu, 1 Sep 2022 17:36:36 +0000 (11:36 -0600)
commite440843448d27f2cc5a6446decd1bcbaae3b1533
treef49c68f1df0d55195aeb9d91e78ce2e1a366b156
parent65e2c14d5a5a406decae07e2b5a2a74e7bd69c68
binman: bintool: parametrize args to pass to binary for returning version

The code to check the version is very similar between binaries, the most
likely only needed variables are the regex to find the version (already
supported) and the args to pass to the binary so that it prints this
version (e.g. --version, -V or similar).

Let's make it a parameter of Bintool so that code duplication can be
avoided for simple changes.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
tools/binman/bintool.py