1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows: add support for ReFS on Windows 10 when creating normal volumes.

This commit is contained in:
Mounir IDRASSI
2017-05-27 20:34:18 +02:00
parent 0e2c129854
commit bc8e6fa5bd
5 changed files with 41 additions and 13 deletions

View File

@@ -475,6 +475,7 @@ begin_format:
case FILESYS_NONE:
case FILESYS_NTFS:
case FILESYS_EXFAT:
case FILESYS_REFS:
if (volParams->bDevice && !StartFormatWriteThread())
{
@@ -626,7 +627,7 @@ begin_format:
}
#ifndef DEBUG
if (volParams->quickFormat && volParams->fileSystem != FILESYS_NTFS && volParams->fileSystem != FILESYS_EXFAT)
if (volParams->quickFormat && volParams->fileSystem != FILESYS_NTFS && volParams->fileSystem != FILESYS_EXFAT && && volParams->fileSystem != FILESYS_REFS)
Sleep (500); // User-friendly GUI
#endif
@@ -660,13 +661,13 @@ error:
goto fv_end;
}
if (volParams->fileSystem == FILESYS_NTFS || volParams->fileSystem == FILESYS_EXFAT)
if (volParams->fileSystem == FILESYS_NTFS || volParams->fileSystem == FILESYS_EXFAT || volParams->fileSystem == FILESYS_REFS)
{
// Quick-format volume as NTFS
int driveNo = GetLastAvailableDrive ();
MountOptions mountOptions;
int retCode;
int fsType = (volParams->fileSystem == FILESYS_EXFAT)? FILESYS_EXFAT: FILESYS_NTFS;
int fsType = volParams->fileSystem;
ZeroMemory (&mountOptions, sizeof (mountOptions));
@@ -932,6 +933,9 @@ BOOL FormatFs (int driveNo, int clusterSize, int fsType)
case FILESYS_EXFAT:
StringCchCopyW (szFsFormat, ARRAYSIZE (szFsFormat),L"EXFAT");
break;
case FILESYS_REFS:
StringCchCopyW (szFsFormat, ARRAYSIZE (szFsFormat),L"ReFS");
break;
default:
return FALSE;
}