summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
+}