// auto block size calculation
ClusterSize = 0;
}
+ else if (!wcsicmp(szFs, L"BtrFS"))
+ {
+ // auto block size calculation
+ ClusterSize = 0;
+ }
else
return FALSE;
EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
}
+ else if (!wcsicmp(wszBuf, L"BtrFS"))
+ {
+ if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
+ {
+ TRACE("BtrFS is not supported on hdd larger than 16E current %lu\n", TotalNumberOfBytes.QuadPart);
+ SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
+ return;
+ }
+
+ if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf)))
+ {
+ hDlgCtrl = GetDlgItem(hwndDlg, 28680);
+ SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
+ lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
+ if (lIndex != CB_ERR)
+ SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
+ SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
+ }
+
+ EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
+ }
else
{
FIXME("unknown fs\n");
HWND hDlgCtrl;
BOOL QuickFormat;
DWORD ClusterSize;
+ DWORD DriveType;
+ FMIFS_MEDIA_FLAG MediaFlag = FMIFS_HARDDISK;
/* set volume path */
szDrive[0] = pContext->Drive + L'A';
*/
FormatDrvDialog = hwndDlg;
+ /* See if the drive is removable or not */
+ DriveType = GetDriveTypeW(szDrive);
+ switch (DriveType)
+ {
+ case DRIVE_UNKNOWN:
+ case DRIVE_REMOTE:
+ case DRIVE_CDROM:
+ case DRIVE_NO_ROOT_DIR:
+ {
+ FIXME("\n");
+ return;
+ }
+
+ case DRIVE_REMOVABLE:
+ MediaFlag = FMIFS_FLOPPY;
+ break;
+
+ case DRIVE_FIXED:
+ case DRIVE_RAMDISK:
+ MediaFlag = FMIFS_HARDDISK;
+ break;
+ }
+
+ /* Format the drive */
FormatEx(szDrive,
- FMIFS_HARDDISK, /* FIXME */
+ MediaFlag,
szFileSys,
szLabel,
QuickFormat,
}
else
{
- pContext->Result = FALSE;
+ pContext->Result = FALSE;
}
}