From bc8e6fa5bd9e8db028fd15f63e681a86059ef933 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 27 May 2017 20:34:18 +0200 Subject: Windows: add support for ReFS on Windows 10 when creating normal volumes. --- src/Common/Format.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Common/Format.c') diff --git a/src/Common/Format.c b/src/Common/Format.c index ead65463..82487bd7 100644 --- a/src/Common/Format.c +++ b/src/Common/Format.c @@ -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; } -- cgit v1.2.3