diff options
author | Yifan Hong <elsk@google.com> | 2017-02-22 18:11:18 -0800 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2017-02-22 18:14:18 -0800 |
commit | 2e3024fca9693ab1655fa0863b4ba885d10e2094 (patch) | |
tree | c3218a84917e932f75387d430dcbee313ab1345c /bootctl | |
parent | c38d4f183c53d66f07d3e52aea74d75a2a294053 (diff) | |
download | extras-2e3024fca9693ab1655fa0863b4ba885d10e2094.tar.gz |
Use interfaceDescriptor instead of interfaceChain
wherever suits. Sementically, interfaceDescriptor
returns the first element of interfaceChain; use
interfaceDescriptor when the rest of the elements
aren't used.
Bug: 34136228
Test: pass
Change-Id: Icc78e7e9b17b7c51c705c20d51c2fbac5b1c5dd7
Diffstat (limited to 'bootctl')
-rw-r--r-- | bootctl/bootctl.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bootctl/bootctl.cpp b/bootctl/bootctl.cpp index 6dda28fb..d80bb158 100644 --- a/bootctl/bootctl.cpp +++ b/bootctl/bootctl.cpp @@ -52,13 +52,10 @@ static void usage(FILE* where, int /* argc */, char* argv[]) } static int do_hal_info(const sp<IBootControl> module) { - module->interfaceChain([&](const auto& chain) { - if (chain.size() == 0) { - return; // error, can't dump info - } + module->interfaceDescriptor([&](const auto& descriptor) { fprintf(stdout, "HAL Version: %s\n", - chain[0].c_str()); + descriptor.c_str()); }); return EX_OK; } |