summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2023-01-17 23:18:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-01-17 23:18:29 +0000
commit76137726800081fa82a969a4d04d0e9bdea836b8 (patch)
treeb3e9ede5d770195bc405f767426422124ce297f0
parent1549faf01e3ef1a34f2e8cf0f00b5123251fda34 (diff)
parentcb5a1abe2d29f426edc59b09c37487bee91e2d85 (diff)
downloadnative-76137726800081fa82a969a4d04d0e9bdea836b8.tar.gz
Merge "lshal: Use vintf::FqInstance for VINTF APIs."
-rw-r--r--cmds/lshal/ListCommand.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp
index ff73c9499f..e54f9d3df7 100644
--- a/cmds/lshal/ListCommand.cpp
+++ b/cmds/lshal/ListCommand.cpp
@@ -353,8 +353,16 @@ bool ListCommand::addEntryWithInstance(const TableEntry& entry,
return false;
}
+ auto vintfFqInstance = vintf::FqInstance::from(fqInstance.string());
+ if (!vintfFqInstance.has_value()) {
+ err() << "Unable to convert " << fqInstance.string() << " to vintf::FqInstance"
+ << std::endl;
+ return false;
+ }
+
std::string e;
- if (!manifest->insertInstance(fqInstance, entry.transport, arch, vintf::HalFormat::HIDL, &e)) {
+ if (!manifest->insertInstance(*vintfFqInstance, entry.transport, arch, vintf::HalFormat::HIDL,
+ &e)) {
err() << "Warning: Cannot insert '" << fqInstance.string() << ": " << e << std::endl;
return false;
}