diff --git a/fs_mgr/liblp/partition_opener.cpp b/fs_mgr/liblp/partition_opener.cpp index 3d3dde6f2..4696ff173 100644 --- a/fs_mgr/liblp/partition_opener.cpp +++ b/fs_mgr/liblp/partition_opener.cpp @@ -38,6 +38,9 @@ using android::base::unique_fd; namespace { std::string GetPartitionAbsolutePath(const std::string& path) { +#if !defined(__ANDROID__) + return path; +#else if (android::base::StartsWith(path, "/")) { return path; } @@ -56,6 +59,7 @@ std::string GetPartitionAbsolutePath(const std::string& path) { } } return by_name; +#endif } bool GetBlockDeviceInfo(const std::string& block_device, BlockDeviceInfo* device_info) {