From 0557cac9cf416c02624321c197ffba7067d9b83b Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 20 Sep 2018 10:52:12 +0200 Subject: Windows: don't use quick format by default when creating file containers using command line and add a switch to enable quick format explicitly in command line --- src/Format/Tcformat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 4274e377..5f77c770 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -249,6 +249,7 @@ int CmdVolumePim = 0; int CmdVolumeFilesystem = FILESYS_NONE; unsigned __int64 CmdVolumeFileSize = 0; BOOL CmdSparseFileSwitch = FALSE; +BOOL CmdQuickFormat = FALSE; BOOL bForceOperation = FALSE; @@ -6192,7 +6193,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } } - quickFormat = TRUE; + quickFormat = CmdQuickFormat; if (!GetDiskFreeSpaceEx (root, &free, 0, 0)) { @@ -8947,6 +8948,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) OptionDynamic, OptionForce, OptionNoSizeCheck, + OptionQuickFormat, }; argument args[]= @@ -8968,6 +8970,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) { OptionDynamic, L"/dynamic", NULL, FALSE }, { OptionForce, L"/force", NULL, FALSE }, { OptionNoSizeCheck, L"/nosizecheck", NULL, FALSE }, + { OptionQuickFormat, L"/quick", NULL, FALSE }, // Internal { CommandResumeSysEncLogOn, L"/acsysenc", L"/a", TRUE }, @@ -9320,6 +9323,10 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) bDontCheckFileContainerSize = TRUE; break; + case OptionQuickFormat: + CmdQuickFormat = TRUE; + break; + case OptionHistory: { wchar_t szTmp[8] = {0}; -- cgit v1.2.3