Merge "liblp: fix host lpdump cannot work issue"

This commit is contained in:
David Anderson 2020-09-02 17:36:00 +00:00 committed by Gerrit Code Review
commit 29e7b2af30
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,9 @@ using android::base::unique_fd;
namespace { namespace {
std::string GetPartitionAbsolutePath(const std::string& path) { std::string GetPartitionAbsolutePath(const std::string& path) {
#if !defined(__ANDROID__)
return path;
#else
if (android::base::StartsWith(path, "/")) { if (android::base::StartsWith(path, "/")) {
return path; return path;
} }
@ -56,6 +59,7 @@ std::string GetPartitionAbsolutePath(const std::string& path) {
} }
} }
return by_name; return by_name;
#endif
} }
bool GetBlockDeviceInfo(const std::string& block_device, BlockDeviceInfo* device_info) { bool GetBlockDeviceInfo(const std::string& block_device, BlockDeviceInfo* device_info) {