VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-26 00:27:14 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-26 00:29:45 (GMT)
commitd53b48bdf02acca8972739f30dae547d0375c21b (patch)
tree66b4fbb38873f91e9677588e92156a0ac26745b6 /src/Main
parent84ee7076d93b56eefafb9f5e464e2fe5e56b83af (diff)
downloadVeraCrypt-d53b48bdf02acca8972739f30dae547d0375c21b.zip
VeraCrypt-d53b48bdf02acca8972739f30dae547d0375c21b.tar.gz
Linux/MacOSX: fix issue creating volumes using command line with a filesystem other than FAT.
Diffstat (limited to 'src/Main')
-rw-r--r--src/Main/CommandLineInterface.cpp21
-rw-r--r--src/Main/TextUserInterface.cpp4
2 files changed, 25 insertions, 0 deletions
diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp
index c91976e..f0d1f25 100644
--- a/src/Main/CommandLineInterface.cpp
+++ b/src/Main/CommandLineInterface.cpp
@@ -297,6 +297,27 @@ namespace VeraCrypt
if (str.IsSameAs (L"FAT", false))
ArgFilesystem = VolumeCreationOptions::FilesystemType::FAT;
+#ifdef TC_LINUX
+ else if (str.IsSameAs (L"Ext2", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext2;
+ else if (str.IsSameAs (L"Ext3", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext3;
+ else if (str.IsSameAs (L"Ext4", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext4;
+ else if (str.IsSameAs (L"NTFS", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::NTFS;
+#elif defined (TC_MACOSX)
+ else if ( str.IsSameAs (L"HFS", false)
+ || str.IsSameAs (L"HFS+", false)
+ || str.IsSameAs (L"MacOsExt", false)
+ )
+ {
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::MacOsExt;
+ }
+#elif defined (TC_FREEBSD) || defined (TC_SOLARIS)
+ else if (str.IsSameAs (L"UFS", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::UFS;
+#endif
else
ArgFilesystem = VolumeCreationOptions::FilesystemType::None;
}
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index c5d64d1..fb654f3 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -883,6 +883,10 @@ namespace VeraCrypt
if (options->Filesystem == VolumeCreationOptions::FilesystemType::MacOsExt && options->Size >= 10 * BYTES_PER_MB)
args.push_back ("-J");
+ // Perform a quick NTFS formatting
+ if (options->Filesystem == VolumeCreationOptions::FilesystemType::NTFS)
+ args.push_back ("-f");
+
args.push_back (string (virtualDevice));
Process::Execute (fsFormatter, args);