summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-03-13 15:19:56 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-03-13 15:19:56 +0100
commitc05c598b734337e6a381de4edcb5937e12a69671 (patch)
treecc04310d90fd97ca531445c4db31c5535ca4f9d8 /partitionmanager.cpp
parentMerge "Fix skipping of relative paths and lost+found in twrpDU" into android-4.4 (diff)
downloadandroid_bootable_recovery-c05c598b734337e6a381de4edcb5937e12a69671.tar
android_bootable_recovery-c05c598b734337e6a381de4edcb5937e12a69671.tar.gz
android_bootable_recovery-c05c598b734337e6a381de4edcb5937e12a69671.tar.bz2
android_bootable_recovery-c05c598b734337e6a381de4edcb5937e12a69671.tar.lz
android_bootable_recovery-c05c598b734337e6a381de4edcb5937e12a69671.tar.xz
android_bootable_recovery-c05c598b734337e6a381de4edcb5937e12a69671.tar.zst
android_bootable_recovery-c05c598b734337e6a381de4edcb5937e12a69671.zip
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index db054d28d..73e22852d 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -78,14 +78,11 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
if (partition->Process_Fstab_Line(line, Display_Error)) {
if (!Found_Settings_Storage && partition->Is_Settings_Storage) {
Found_Settings_Storage = true;
- Partitions.push_back(partition);
- DataManager::SetValue("tw_settings_path", partition->Storage_Path);
- DataManager::SetValue("tw_storage_path", partition->Storage_Path);
- LOGINFO("Settings storage is '%s'\n", partition->Storage_Path.c_str());
+ Setup_Settings_Storage_Partition(partition);
} else {
partition->Is_Settings_Storage = false;
- Partitions.push_back(partition);
}
+ Partitions.push_back(partition);
} else {
delete partition;
}
@@ -95,14 +92,7 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
std::vector<TWPartition*>::iterator iter;
for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
if ((*iter)->Is_Storage) {
- (*iter)->Is_Settings_Storage = true;
-#ifndef RECOVERY_SDCARD_ON_DATA
- (*iter)->Setup_AndSec();
-#endif
- Found_Settings_Storage = true;
- DataManager::SetValue("tw_settings_path", (*iter)->Storage_Path);
- DataManager::SetValue("tw_storage_path", (*iter)->Storage_Path);
- LOGINFO("Settings storage is '%s'\n", (*iter)->Storage_Path.c_str());
+ Setup_Settings_Storage_Partition((*iter));
break;
}
}
@@ -148,6 +138,15 @@ int TWPartitionManager::Write_Fstab(void) {
return true;
}
+void TWPartitionManager::Setup_Settings_Storage_Partition(TWPartition* Part) {
+#ifndef RECOVERY_SDCARD_ON_DATA
+ Part->Setup_AndSec();
+#endif
+ DataManager::SetValue("tw_settings_path", Part->Storage_Path);
+ DataManager::SetValue("tw_storage_path", Part->Storage_Path);
+ LOGINFO("Settings storage is '%s'\n", Part->Storage_Path.c_str());
+}
+
void TWPartitionManager::Output_Partition_Logging(void) {
std::vector<TWPartition*>::iterator iter;