diff options
Diffstat (limited to 'otautil/roots.cpp')
-rw-r--r-- | otautil/roots.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/otautil/roots.cpp b/otautil/roots.cpp index 815d644e5..431551785 100644 --- a/otautil/roots.cpp +++ b/otautil/roots.cpp @@ -51,6 +51,8 @@ using android::fs_mgr::ReadDefaultFstab; static Fstab fstab; +constexpr const char* CACHE_ROOT = "/cache"; + void load_volume_table() { if (!ReadDefaultFstab(&fstab)) { LOG(ERROR) << "Failed to read default fstab"; @@ -276,10 +278,8 @@ int setup_install_mounts() { return 0; } -bool logical_partitions_mapped() { - return android::fs_mgr::LogicalPartitionsMapped(); -} - -std::string get_system_root() { - return android::fs_mgr::GetSystemRoot(); +bool HasCache() { + CHECK(!fstab.empty()); + static bool has_cache = volume_for_mount_point(CACHE_ROOT) != nullptr; + return has_cache; } |