OSDN Git Service

boot control: remove getInterfaceVersion
authorSteven Moreland <smoreland@google.com>
Wed, 4 Jan 2017 21:00:07 +0000 (13:00 -0800)
committerSteven Moreland <smoreland@google.com>
Wed, 4 Jan 2017 21:00:07 +0000 (13:00 -0800)
getInterfaceVersion doesn't provide any information and is being
removed. I've replaced the call with interfaceChain here so that a
better description can be obtained.

Bug: 34041669
Test: compiles
Change-Id: I00e5154e92edf2dd17b3e899b094589642ba3b3e

bootctl/bootctl.cpp

index ae80813..5f8b979 100644 (file)
@@ -52,10 +52,14 @@ static void usage(FILE* where, int /* argc */, char* argv[])
 }
 
 static int do_hal_info(const sp<IBootControl> module) {
-    fprintf(stdout,
-            "HAL module version: %u.%u\n",
-            module->getInterfaceVersion().get_major(),
-            module->getInterfaceVersion().get_minor());
+    module->interfaceChain([&](const auto& chain) {
+        if (chain.size() == 0) {
+            return; // error, can't dump info
+        }
+        fprintf(stdout,
+                "HAL Version: %s\n",
+                chain[0].c_str());
+    });
     return EX_OK;
 }