diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2020-11-05 13:52:00 -0500 |
---|---|---|
committer | Kelvin Zhang <zhangkelvin@google.com> | 2020-11-23 14:49:17 -0500 |
commit | 91d95fa9454d56f486e49742039ddb92e10cf054 (patch) | |
tree | 12fd299e1333feb82157b245d8fd38e08f0967e6 /aosp/dynamic_partition_test_utils.h | |
parent | 098e79a0c348d2636fd102db081b4e03cb30ef9d (diff) |
Do not map dynamic partitions on VABC devices
With VABC, we no longer need to map all partitions before
reading/writing, so don't try to map them.
1. modify GetPartitionDevice to return empty path for target partitions
on VABC
2. Add a separate GetMountableTargetDevice for obtaining a mountable
device path, specifically for postinstall
Test: treehugger
Change-Id: Ib1f608914fc49c677ce7389140ca79b028171191
Diffstat (limited to 'aosp/dynamic_partition_test_utils.h')
-rw-r--r-- | aosp/dynamic_partition_test_utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aosp/dynamic_partition_test_utils.h b/aosp/dynamic_partition_test_utils.h index c7be1cb7..c5183823 100644 --- a/aosp/dynamic_partition_test_utils.h +++ b/aosp/dynamic_partition_test_utils.h @@ -47,7 +47,7 @@ using namespace android::storage_literals; // NOLINT(build/namespaces) constexpr const uint32_t kMaxNumSlots = 2; constexpr const char* kSlotSuffixes[kMaxNumSlots] = {"_a", "_b"}; -constexpr const char* kFakeDevicePath = "/fake/dev/path/"; +constexpr std::string_view kFakeDevicePath = "/fake/dev/path/"; constexpr const char* kFakeDmDevicePath = "/fake/dm/dev/path/"; constexpr const uint32_t kFakeMetadataSize = 65536; constexpr const char* kDefaultGroup = "foo"; @@ -112,7 +112,7 @@ inline std::ostream& operator<<(std::ostream& os, } inline std::string GetDevice(const std::string& name) { - return kFakeDevicePath + name; + return std::string(kFakeDevicePath) + name; } inline std::string GetDmDevice(const std::string& name) { |