summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-03-19 16:23:32 +0100
committerDees Troy <dees_troy@teamw.in>2014-03-19 16:24:01 +0100
commit02a6453b7530db16724e047d7a9fba71b40de455 (patch)
treef21fed39d2c21bb7f3c21d4e1100b3f265574235 /partitionmanager.cpp
parentChange to lstat so we don't count the target of symbolic links as part (diff)
downloadandroid_bootable_recovery-02a6453b7530db16724e047d7a9fba71b40de455.tar
android_bootable_recovery-02a6453b7530db16724e047d7a9fba71b40de455.tar.gz
android_bootable_recovery-02a6453b7530db16724e047d7a9fba71b40de455.tar.bz2
android_bootable_recovery-02a6453b7530db16724e047d7a9fba71b40de455.tar.lz
android_bootable_recovery-02a6453b7530db16724e047d7a9fba71b40de455.tar.xz
android_bootable_recovery-02a6453b7530db16724e047d7a9fba71b40de455.tar.zst
android_bootable_recovery-02a6453b7530db16724e047d7a9fba71b40de455.zip
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 73e22852d..f094734c4 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -56,7 +56,7 @@ TWPartitionManager::TWPartitionManager(void) {
int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error) {
FILE *fstabFile;
char fstab_line[MAX_FSTAB_LINE_LENGTH];
- bool Found_Settings_Storage = false;
+ TWPartition* settings_partition = NULL;
fstabFile = fopen(Fstab_Filename.c_str(), "rt");
if (fstabFile == NULL) {
@@ -76,9 +76,8 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
memset(fstab_line, 0, sizeof(fstab_line));
if (partition->Process_Fstab_Line(line, Display_Error)) {
- if (!Found_Settings_Storage && partition->Is_Settings_Storage) {
- Found_Settings_Storage = true;
- Setup_Settings_Storage_Partition(partition);
+ if (!settings_partition && partition->Is_Settings_Storage) {
+ settings_partition = partition;
} else {
partition->Is_Settings_Storage = false;
}
@@ -88,15 +87,15 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
}
}
fclose(fstabFile);
- if (!Found_Settings_Storage) {
+ if (!settings_partition) {
std::vector<TWPartition*>::iterator iter;
for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
if ((*iter)->Is_Storage) {
- Setup_Settings_Storage_Partition((*iter));
+ settings_partition = (*iter);
break;
}
}
- if (!Found_Settings_Storage)
+ if (!settings_partition)
LOGERR("Unable to locate storage partition for storing settings file.\n");
}
if (!Write_Fstab()) {
@@ -107,6 +106,7 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
}
Update_System_Details();
UnMount_Main_Partitions();
+ Setup_Settings_Storage_Partition(settings_partition);
return true;
}