Ventoy2Disk update:

1. Add UDF filesytem option.
2. Add Cluster Size option.
3. Support FAT32 for disk bigger than 32GB.
4. Fix the format fail issue.
5. Add a tip bubble with cluster size when mouse hover on the file system type string.
6. The secure boot lock character can not show in early Windows, change it to a yellow icon.
This commit is contained in:
longpanda
2022-11-30 21:12:43 +08:00
parent 118bedd546
commit ee04af5243
23 changed files with 549 additions and 97 deletions

View File

@@ -256,25 +256,27 @@ BOOL PSHELL_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLette
return ret;
}
BOOL PSHELL_FormatVolume(char DriveLetter, int fs)
BOOL PSHELL_FormatVolume(char DriveLetter, int fs, DWORD ClusterSize)
{
BOOL ret;
const char* fsname = NULL;
CHAR CmdBuf[512];
if (fs == 1)
fsname = GetVentoyFsFmtNameByTypeA(fs);
if (ClusterSize > 0)
{
fsname = "NTFS";
sprintf_s(CmdBuf, sizeof(CmdBuf),
"format-volume -DriveLetter %C -FileSystem %s -AllocationUnitSize %u -Force -NewFileSystemLabel Ventoy",
DriveLetter, fsname, ClusterSize);
}
else
{
fsname = "FAT32";
sprintf_s(CmdBuf, sizeof(CmdBuf),
"format-volume -DriveLetter %C -FileSystem %s -Force -NewFileSystemLabel Ventoy",
DriveLetter, fsname);
}
sprintf_s(CmdBuf, sizeof(CmdBuf),
"format-volume -DriveLetter %C -FileSystem %s -Force -NewFileSystemLabel Ventoy",
DriveLetter, fsname);
ret = PSHELL_CommProc(CmdBuf);
Log("PSHELL_FormatVolume %C: ret:%d (%s)", DriveLetter, ret, ret ? "SUCCESS" : "FAIL");
return ret;