summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-02-16 19:30:26 +0100
committerEthan Yonker <dees_troy@teamw.in>2016-02-18 18:38:33 +0100
commitfcf3f24856c599c922880c64b01b7610603f958c (patch)
tree82aba551f80da8bdd87f3e39359a1a8dff007186 /partitionmanager.cpp
parentpatternpassword: update large grid password scheme (diff)
downloadandroid_bootable_recovery-fcf3f24856c599c922880c64b01b7610603f958c.tar
android_bootable_recovery-fcf3f24856c599c922880c64b01b7610603f958c.tar.gz
android_bootable_recovery-fcf3f24856c599c922880c64b01b7610603f958c.tar.bz2
android_bootable_recovery-fcf3f24856c599c922880c64b01b7610603f958c.tar.lz
android_bootable_recovery-fcf3f24856c599c922880c64b01b7610603f958c.tar.xz
android_bootable_recovery-fcf3f24856c599c922880c64b01b7610603f958c.tar.zst
android_bootable_recovery-fcf3f24856c599c922880c64b01b7610603f958c.zip
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 1c59de7f0..cc090cf4b 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -2413,3 +2413,16 @@ void TWPartitionManager::Decrypt_Adopted() {
return;
#endif
}
+
+void TWPartitionManager::Remove_Partition_By_Path(string Path) {
+ std::vector<TWPartition*>::iterator iter;
+ string Local_Path = TWFunc::Get_Root_Path(Path);
+
+ for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
+ if ((*iter)->Mount_Point == Local_Path || (!(*iter)->Symlink_Mount_Point.empty() && (*iter)->Symlink_Mount_Point == Local_Path)) {
+ LOGINFO("Found and erasing '%s' from partition list\n", Local_Path.c_str());
+ Partitions.erase(iter);
+ return;
+ }
+ }
+}