summaryrefslogtreecommitdiffstats
path: root/partition.cpp
diff options
context:
space:
mode:
authorbigbiff <bigbiff@teamw.in>2014-11-27 02:36:07 +0100
committerDees Troy <dees_troy@teamw.in>2014-12-04 17:32:27 +0100
commit7cb4c3322b3a282e63e77b0d2205fd2e51b8b932 (patch)
tree7ff7761604c2f6d82b444a66205126f8d81856e5 /partition.cpp
parentReduce libs needed for decrypt and clean up old decypt files (diff)
downloadandroid_bootable_recovery-7cb4c3322b3a282e63e77b0d2205fd2e51b8b932.tar
android_bootable_recovery-7cb4c3322b3a282e63e77b0d2205fd2e51b8b932.tar.gz
android_bootable_recovery-7cb4c3322b3a282e63e77b0d2205fd2e51b8b932.tar.bz2
android_bootable_recovery-7cb4c3322b3a282e63e77b0d2205fd2e51b8b932.tar.lz
android_bootable_recovery-7cb4c3322b3a282e63e77b0d2205fd2e51b8b932.tar.xz
android_bootable_recovery-7cb4c3322b3a282e63e77b0d2205fd2e51b8b932.tar.zst
android_bootable_recovery-7cb4c3322b3a282e63e77b0d2205fd2e51b8b932.zip
Diffstat (limited to '')
-rw-r--r--partition.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/partition.cpp b/partition.cpp
index 123e9fa3f..6225f221f 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -2035,3 +2035,28 @@ void TWPartition::Recreate_AndSec_Folder(void) {
PartitionManager.UnMount_By_Path(Symlink_Mount_Point, true);
}
}
+
+uint64_t TWPartition::Get_Max_FileSize() {
+ uint64_t maxFileSize = 0;
+ const uint64_t constGB = (uint64_t) 1024 * 1024 * 1024;
+ const uint64_t constTB = (uint64_t) constGB * 1024;
+ const uint64_t constPB = (uint64_t) constTB * 1024;
+ const uint64_t constEB = (uint64_t) constPB * 1024;
+
+ if (Current_File_System == "ext4")
+ maxFileSize = 16 * constTB; //16 TB
+ else if (Current_File_System == "vfat")
+ maxFileSize = 4 * constGB; //4 GB
+ else if (Current_File_System == "ntfs")
+ maxFileSize = 256 * constTB; //256 TB
+ if (Current_File_System == "exfat")
+ maxFileSize = 16 * constPB; //16 PB
+ else if (Current_File_System == "ext3")
+ maxFileSize = 2 * constTB; //2 TB
+ else if (Current_File_System == "f2fs")
+ maxFileSize = 3.94 * constTB; //3.94 TB
+ else
+ maxFileSize = 100000000L;
+ return maxFileSize - 1;
+}
+