diff options
author | dhacker29 <dhackerdvm@gmail.com> | 2015-01-18 01:42:33 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2015-02-02 18:19:51 +0100 |
commit | a3fa75fd663e1488cdc0017a4fbf66150833b929 (patch) | |
tree | 6fd73a0339dbb03a058a410efa71cad5b86f0664 /partition.cpp | |
parent | MTP: make MTP work even if unplugged and replugged (diff) | |
download | android_bootable_recovery-a3fa75fd663e1488cdc0017a4fbf66150833b929.tar android_bootable_recovery-a3fa75fd663e1488cdc0017a4fbf66150833b929.tar.gz android_bootable_recovery-a3fa75fd663e1488cdc0017a4fbf66150833b929.tar.bz2 android_bootable_recovery-a3fa75fd663e1488cdc0017a4fbf66150833b929.tar.lz android_bootable_recovery-a3fa75fd663e1488cdc0017a4fbf66150833b929.tar.xz android_bootable_recovery-a3fa75fd663e1488cdc0017a4fbf66150833b929.tar.zst android_bootable_recovery-a3fa75fd663e1488cdc0017a4fbf66150833b929.zip |
Diffstat (limited to '')
-rw-r--r-- | partition.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/partition.cpp b/partition.cpp index e30e6c11d..065154150 100644 --- a/partition.cpp +++ b/partition.cpp @@ -1642,7 +1642,18 @@ bool TWPartition::Wipe_F2FS() { gui_print("Formatting %s using mkfs.f2fs...\n", Display_Name.c_str()); Find_Actual_Block_Device(); - command = "mkfs.f2fs " + Actual_Block_Device; + command = "mkfs.f2fs -t 1"; + if (!Is_Decrypted && Length != 0) { + // Only use length if we're not decrypted + char len[32]; + int mod_length = Length; + if (Length < 0) + mod_length *= -1; + sprintf(len, "%i", mod_length); + command += " -r "; + command += len; + } + command += " " + Actual_Block_Device; if (TWFunc::Exec_Cmd(command) == 0) { Recreate_AndSec_Folder(); gui_print("Done.\n"); |