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

This commit is contained in:
Mounir IDRASSI 2018-09-20 10:52:12 +02:00
parent 081287fc0a
commit 0557cac9cf
No known key found for this signature in database
GPG Key ID: DD0C382D5FCFB8FC
1 changed files with 8 additions and 1 deletions

View File

@ -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};