mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 05:55:30 -04:00
[core] remove the call to IOCTL_DISK_DELETE_DRIVE_LAYOUT
* As per issue #122, this creates problems when formatting a drive in FAT16 * Also remove an unnecessary backslash in icon.c
This commit is contained in:
parent
9925cc945d
commit
967ad1da33
4 changed files with 7 additions and 43 deletions
28
src/drive.c
28
src/drive.c
|
@ -676,34 +676,6 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* Delete the disk partition table */
|
||||
BOOL DeletePartitions(HANDLE hDrive)
|
||||
{
|
||||
BOOL r;
|
||||
DWORD size;
|
||||
|
||||
PrintStatus(0, TRUE, "Erasing Partitions...");
|
||||
|
||||
r = DeviceIoControl(hDrive, IOCTL_DISK_DELETE_DRIVE_LAYOUT, NULL, 0, NULL, 0, &size, NULL );
|
||||
if (!r) {
|
||||
// Ignore GEN_FAILURE as this is what XP returns for unpartitioned
|
||||
if (GetLastError() != ERROR_GEN_FAILURE) {
|
||||
uprintf("Could not delete drive layout: %s\n", WindowsErrorString());
|
||||
safe_closehandle(hDrive);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
r = DeviceIoControl(hDrive, IOCTL_DISK_UPDATE_PROPERTIES, NULL, 0, NULL, 0, &size, NULL );
|
||||
if (!r) {
|
||||
uprintf("Could not refresh drive layout: %s\n", WindowsErrorString());
|
||||
safe_closehandle(hDrive);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert a partition type to its human readable form using
|
||||
* (slightly modified) entries from GNU fdisk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue