]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: btool: futility: use Bintool.version
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Thu, 1 Sep 2022 15:51:42 +0000 (17:51 +0200)
committerSimon Glass <sjg@chromium.org>
Thu, 1 Sep 2022 17:36:36 +0000 (11:36 -0600)
Bintool.version can now be passed the binary argument to return the
version text, so there's no need to override it in futility anymore.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/binman/btool/futility.py

index 8d00966a9d031be921badefb264b11fc101ccf25..75a05c2ac66bd78508e82fb3ae6d92f3d9029f46 100644 (file)
@@ -69,7 +69,7 @@ class Bintoolfutility(bintool.Bintool):
         https://chromium.googlesource.com/chromiumos/platform/vboot/+/refs/heads/main/_vboot_reference/README
     """
     def __init__(self, name):
-        super().__init__(name, 'Chromium OS firmware utility')
+        super().__init__(name, 'Chromium OS firmware utility', r'^(.*)$', 'version')
 
     def gbb_create(self, fname, sizes):
         """Create a new Google Binary Block
@@ -165,14 +165,3 @@ class Bintoolfutility(bintool.Bintool):
         fname, tmpdir = self.fetch_from_drive(
             '1hdsInzsE4aJbmBeJ663kYgjOQyW1I-E0')
         return fname, tmpdir
-
-    def version(self):
-        """Version handler for futility
-
-        Returns:
-            str: Version string for futility
-        """
-        out = self.run_cmd('version').strip()
-        if not out:
-            return super().version()
-        return out