diff options
author | Mark Salyzyn <salyzyn@google.com> | 2019-04-10 14:41:51 -0700 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-06-21 10:52:58 -0700 |
commit | e16fdcd66b93764ee73a070abde72419e74253c3 (patch) | |
tree | 0d17885c6d40de64e929ac118faabace046c9e37 | |
parent | 490f1cf0748edb7954b3aff28928cb2ce6378f53 (diff) | |
download | core-e16fdcd66b93764ee73a070abde72419e74253c3.tar.gz |
fs_mgr: overlay: only use system_<other> if other slot suffix not blank
Test: adb-remount-test.sh
Bug: 129988285
Change-Id: Ib929d242e7cc4953096eb6300bcf7888ce2259ab
Merged-In: Ib929d242e7cc4953096eb6300bcf7888ce2259ab
-rw-r--r-- | fs_mgr/fs_mgr_overlayfs.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs_mgr/fs_mgr_overlayfs.cpp b/fs_mgr/fs_mgr_overlayfs.cpp index c13c3b11d..0a6014d60 100644 --- a/fs_mgr/fs_mgr_overlayfs.cpp +++ b/fs_mgr/fs_mgr_overlayfs.cpp @@ -621,7 +621,9 @@ std::string fs_mgr_overlayfs_scratch_device() { if (!dm.GetDmDevicePathByName(partition_name, &path)) { // non-DAP A/B device? if (fs_mgr_access(super_device)) return ""; - path = kPhysicalDevice + "system" + (slot_number ? "_a" : "_b"); + auto other_slot = fs_mgr_get_other_slot_suffix(); + if (other_slot.empty()) return ""; + path = kPhysicalDevice + "system" + other_slot; } } return scratch_device_cache = path; |