summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2014-05-12 15:41:52 +0200
committerGerrit Code Review <gerrit2@gerrit>2014-05-31 14:26:12 +0200
commit93cb1ef2ebd480acf9f49af9da0990aed71f49a5 (patch)
tree27cf02d99c7010418b807d795ee3a9e98ef1b3de /partitionmanager.cpp
parentFix multiple lun file USB mounting (diff)
downloadandroid_bootable_recovery-93cb1ef2ebd480acf9f49af9da0990aed71f49a5.tar
android_bootable_recovery-93cb1ef2ebd480acf9f49af9da0990aed71f49a5.tar.gz
android_bootable_recovery-93cb1ef2ebd480acf9f49af9da0990aed71f49a5.tar.bz2
android_bootable_recovery-93cb1ef2ebd480acf9f49af9da0990aed71f49a5.tar.lz
android_bootable_recovery-93cb1ef2ebd480acf9f49af9da0990aed71f49a5.tar.xz
android_bootable_recovery-93cb1ef2ebd480acf9f49af9da0990aed71f49a5.tar.zst
android_bootable_recovery-93cb1ef2ebd480acf9f49af9da0990aed71f49a5.zip
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 9d8c27305..be4ba6359 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1955,3 +1955,19 @@ void TWPartitionManager::Output_Storage_Fstab(void) {
}
fclose(fp);
}
+
+TWPartition *TWPartitionManager::Get_Default_Storage_Partition()
+{
+ TWPartition *res = NULL;
+ for (std::vector<TWPartition*>::iterator iter = Partitions.begin(); iter != Partitions.end(); ++iter) {
+ if(!(*iter)->Is_Storage)
+ continue;
+
+ if((*iter)->Is_Settings_Storage)
+ return *iter;
+
+ if(!res)
+ res = *iter;
+ }
+ return res;
+}