diff options
Diffstat (limited to 'cmds/lshal/Lshal.cpp')
-rw-r--r-- | cmds/lshal/Lshal.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cmds/lshal/Lshal.cpp b/cmds/lshal/Lshal.cpp index 132b31ebc3..bc99f4d473 100644 --- a/cmds/lshal/Lshal.cpp +++ b/cmds/lshal/Lshal.cpp @@ -59,7 +59,8 @@ void Lshal::forEachCommand(const std::function<void(const Command* c)>& f) const } void Lshal::usage() { - err() << "lshal: List and debug HALs." << std::endl << std::endl + err() << "lshal: List and debug HIDL HALs." << std::endl + << " (for AIDL HALs, see `dumpsys`)" << std::endl << std::endl << "commands:" << std::endl; size_t nameMaxLength = 0; @@ -101,7 +102,7 @@ Status Lshal::emitDebugInfo( const std::string &interfaceName, const std::string &instanceName, const std::vector<std::string> &options, - bool excludesParentInstances, + ParentDebugInfoLevel parentDebugInfoLevel, std::ostream &out, NullableOStream<std::ostream> err) const { using android::hidl::base::V1_0::IBase; @@ -126,7 +127,7 @@ Status Lshal::emitDebugInfo( return NO_INTERFACE; } - if (excludesParentInstances) { + if (parentDebugInfoLevel != ParentDebugInfoLevel::FULL) { const std::string descriptor = getDescriptor(base.get()); if (descriptor.empty()) { std::string msg = interfaceName + "/" + instanceName + " getDescriptor failed"; @@ -134,11 +135,14 @@ Status Lshal::emitDebugInfo( LOG(ERROR) << msg; } if (descriptor != interfaceName) { + if (parentDebugInfoLevel == ParentDebugInfoLevel::FQNAME_ONLY) { + out << "[See " << descriptor << "/" << instanceName << "]"; + } return OK; } } - PipeRelay relay(out); + PipeRelay relay(out, err, interfaceName, instanceName); if (relay.initCheck() != OK) { std::string msg = "PipeRelay::initCheck() FAILED w/ " + std::to_string(relay.initCheck()); |