Home
last modified time | relevance | path

Searched refs:DmDeviceState (Results 1 – 17 of 17) sorted by relevance

/system/core/fs_mgr/libdm/
Ddm.cpp88 if (GetState(name) == DmDeviceState::INVALID) { in DeleteDeviceIfExists()
211 DmDeviceState DeviceMapper::GetState(const std::string& name) const { in GetState()
215 return DmDeviceState::INVALID; in GetState()
218 return DmDeviceState::ACTIVE; in GetState()
220 return DmDeviceState::SUSPENDED; in GetState()
223 bool DeviceMapper::ChangeState(const std::string& name, DmDeviceState state) { in ChangeState()
224 if (state != DmDeviceState::SUSPENDED && state != DmDeviceState::ACTIVE) { in ChangeState()
231 if (state == DmDeviceState::SUSPENDED) io.flags = DM_SUSPEND_FLAG; in ChangeState()
235 << (state == DmDeviceState::SUSPENDED ? "suspend" : "resume") << " failed"; in ChangeState()
Ddm_test.cpp147 ASSERT_EQ(dm.GetState(dev.name()), DmDeviceState::ACTIVE); in TEST()
149 ASSERT_TRUE(dm.ChangeState(dev.name(), DmDeviceState::SUSPENDED)); in TEST()
150 ASSERT_EQ(dm.GetState(dev.name()), DmDeviceState::SUSPENDED); in TEST()
152 ASSERT_TRUE(dm.ChangeState(dev.name(), DmDeviceState::ACTIVE)); in TEST()
153 ASSERT_EQ(dm.GetState(dev.name()), DmDeviceState::ACTIVE); in TEST()
556 ASSERT_EQ(DmDeviceState::INVALID, dm.GetState("libdm-test-dm-linear")); in TEST()
/system/core/fs_mgr/libdm/include/libdm/
Ddm.h48 enum class DmDeviceState { INVALID, SUSPENDED, ACTIVE }; enum
105 DmDeviceState GetState(const std::string& name) const;
110 bool ChangeState(const std::string& name, DmDeviceState state);
/system/update_engine/
Ddynamic_partition_control_android.cc52 using android::dm::DmDeviceState;
192 DmDeviceState state = GetState(target_partition_name); in MapPartitionOnDeviceMapper()
193 if (state == DmDeviceState::ACTIVE) { in MapPartitionOnDeviceMapper()
214 if (state != DmDeviceState::INVALID) { in MapPartitionOnDeviceMapper()
216 << static_cast<std::underlying_type_t<DmDeviceState>>(state); in MapPartitionOnDeviceMapper()
220 if (state == DmDeviceState::INVALID) { in MapPartitionOnDeviceMapper()
227 << static_cast<std::underlying_type_t<DmDeviceState>>(state); in MapPartitionOnDeviceMapper()
234 DmDeviceState::INVALID) { in UnmapPartitionOnDeviceMapper()
284 android::dm::DmDeviceState DynamicPartitionControlAndroid::GetState( in GetState()
987 if (GetState(partition_name_suffix) != DmDeviceState::ACTIVE) { in GetDynamicPartitionDevice()
Dmock_dynamic_partition_control.h45 MOCK_METHOD(::android::dm::DmDeviceState,
Dboot_control_android.cc33 using android::dm::DmDeviceState;
Ddynamic_partition_control_android.h131 virtual android::dm::DmDeviceState GetState(const std::string& name);
Ddynamic_partition_control_android_unittest.cc34 using android::dm::DmDeviceState;
362 .WillOnce(Return(DmDeviceState::ACTIVE)); in TEST_P()
417 .WillOnce(Return(DmDeviceState::ACTIVE)); in TEST_P()
425 .WillOnce(Return(DmDeviceState::ACTIVE)); in TEST_P()
/system/core/fs_mgr/libfiemap/
Dimage_manager.cpp41 using android::dm::DmDeviceState;
109 return dm.GetState(image_name) != DmDeviceState::INVALID; in IsImageMapped()
686 if (dm.GetState(name) == DmDeviceState::INVALID) { in GetMappedImageDevice()
/system/core/fs_mgr/libsnapshot/
Dpower_test.cpp44 using android::dm::DmDeviceState;
408 if (dm_.GetState(kSnapshotName) == DmDeviceState::INVALID) { in Merge()
Dsnapshot.cpp52 using android::dm::DmDeviceState;
593 if (dm.GetState(snapshot) == DmDeviceState::INVALID) { in InitiateMerge()
745 if (dm.GetState(dm_name) == DmDeviceState::INVALID) { in GetSingleTarget()
2774 if (dm.GetState(device_name) != DmDeviceState::INVALID) { in GetMappedImageDeviceStringOrPath()
Dsnapshot_test.cpp54 using android::dm::DmDeviceState;
/system/core/fs_mgr/tools/
Ddmctl.cpp478 if (!dm.ChangeState(argv[0], DmDeviceState::ACTIVE)) { in ResumeCmdHandler()
492 if (!dm.ChangeState(argv[0], DmDeviceState::SUSPENDED)) { in SuspendCmdHandler()
/system/core/fs_mgr/
Dfs_mgr_overlayfs.cpp898 if (dm.GetState(partition_name) != DmDeviceState::INVALID && in GetBootScratchDevice()
940 if (dm.GetState(name) != DmDeviceState::INVALID && !DestroyLogicalPartition(name)) { in TruncatePartitionsWithSuffix()
954 *partition_exists = dm.GetState(partition_name) != DmDeviceState::INVALID; in CreateDynamicScratch()
Dfs_mgr.cpp107 using android::dm::DmDeviceState;
1227 if (dm.GetState(kUserdataWrapperName) != DmDeviceState::INVALID) { in WrapUserdata()
2082 if (dm.GetState(mount_point) == DmDeviceState::INVALID) { in fs_mgr_is_verity_enabled()
2113 if (dm.GetState(device) == DmDeviceState::INVALID || !dm.GetTableInfo(device, &table)) { in fs_mgr_verity_is_check_at_most_once()
/system/core/init/
Dfirst_stage_mount.cpp198 if (dm.GetState("vroot") != android::dm::DmDeviceState::INVALID) { in GetRootEntry()
/system/apex/apexd/
Dapexd.cpp90 using android::dm::DmDeviceState;
270 if (dm.GetState(name) != DmDeviceState::INVALID) { in createVerityDevice()