[misc] address various TODOs and improve UI

* display comprehensive partition information
* improve tooltips
* remove TODOs that are no longer relevant
This commit is contained in:
Pete Batard 2012-05-29 17:47:24 +01:00
parent af80c80917
commit 372b89ba3a
6 changed files with 57 additions and 41 deletions

View file

@ -937,7 +937,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
kbdrv = bFreeDOS?fd_get_kbdrv(kb):ms_get_kbdrv(kb); kbdrv = bFreeDOS?fd_get_kbdrv(kb):ms_get_kbdrv(kb);
if (kbdrv == NULL) { if (kbdrv == NULL) {
uprintf("Keyboard id '%s' is not supported - falling back to 'us'\n", kb); uprintf("Keyboard id '%s' is not supported - falling back to 'us'\n", kb);
kb = "us"; // TODO: smarter fallback? kb = "us";
kbdrv = bFreeDOS?fd_get_kbdrv(kb):ms_get_kbdrv(kb); // Always succeeds kbdrv = bFreeDOS?fd_get_kbdrv(kb):ms_get_kbdrv(kb); // Always succeeds
} }
uprintf("Will use DOS keyboard '%s' [%s]\n", kb, kb_to_hr(kb)); uprintf("Will use DOS keyboard '%s' [%s]\n", kb, kb_to_hr(kb));
@ -1018,4 +1018,3 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
return TRUE; return TRUE;
} }

View file

@ -102,8 +102,8 @@ HANDLE GetDriveHandle(DWORD DriveIndex, char* DriveLetter, BOOL bWriteAccess, BO
value there => Use GetDriveType() to filter out unwanted devices. value there => Use GetDriveType() to filter out unwanted devices.
See https://github.com/pbatard/rufus/issues/32 for details. */ See https://github.com/pbatard/rufus/issues/32 for details. */
drive_type = GetDriveTypeA(drive); drive_type = GetDriveTypeA(drive);
// NB: the HP utility allows drive_type == DRIVE_FIXED, which we don't really really want for now // NB: the HP utility allows drive_type == DRIVE_FIXED, which we don't allow by default
// TODO: allow fixed drives after partitioning/preserving of existing partitions has been sorted out // Using Alt-F in Rufus does enable listing, but this mode is unsupported.
if ((drive_type != DRIVE_REMOVABLE) && ((!enable_fixed_disks) || (drive_type != DRIVE_FIXED))) if ((drive_type != DRIVE_REMOVABLE) && ((!enable_fixed_disks) || (drive_type != DRIVE_FIXED)))
continue; continue;

View file

@ -415,7 +415,7 @@ BOOL WriteRufusMBR(FILE *fp)
unsigned char aucRef[] = {0x55, 0xAA}; unsigned char aucRef[] = {0x55, 0xAA};
unsigned char* rufus_mbr; unsigned char* rufus_mbr;
// TODO: will we need to edit the disk ID according to UI sel in the MBR as well? // TODO: Will we need to edit the disk ID according to UI selection in the MBR as well?
res = FindResource(hMainInstance, MAKEINTRESOURCE(IDR_BR_MBR_BIN), RT_RCDATA); res = FindResource(hMainInstance, MAKEINTRESOURCE(IDR_BR_MBR_BIN), RT_RCDATA);
if (res == NULL) { if (res == NULL) {
uprintf("Unable to locate mbr.bin resource: %s\n", WindowsErrorString()); uprintf("Unable to locate mbr.bin resource: %s\n", WindowsErrorString());
@ -449,7 +449,7 @@ static BOOL WriteMBR(HANDLE hPhysicalDrive)
// FormatEx rewrites the MBR and removes the LBA attribute of FAT16 // FormatEx rewrites the MBR and removes the LBA attribute of FAT16
// and FAT32 partitions - we need to correct this in the MBR // and FAT32 partitions - we need to correct this in the MBR
// TODO: something else for bootable GPT // TODO: Something else for bootable GPT
buf = (unsigned char*)malloc(SecSize * nSecs); buf = (unsigned char*)malloc(SecSize * nSecs);
if (buf == NULL) { if (buf == NULL) {
uprintf("Could not allocate memory for MBR"); uprintf("Could not allocate memory for MBR");
@ -526,7 +526,6 @@ static BOOL WritePBR(HANDLE hLogicalVolume)
fake_fd._ptr = (char*)hLogicalVolume; fake_fd._ptr = (char*)hLogicalVolume;
fake_fd._bufsiz = SelectedDrive.Geometry.BytesPerSector; fake_fd._bufsiz = SelectedDrive.Geometry.BytesPerSector;
// TODO: call write_partition_number_of_heads() and write_partition_start_sector_number()?
switch (ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem))) { switch (ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem))) {
case FS_FAT16: case FS_FAT16:
if (!is_fat_16_fs(&fake_fd)) { if (!is_fat_16_fs(&fake_fd)) {
@ -582,7 +581,6 @@ static BOOL WritePBR(HANDLE hLogicalVolume)
/* /*
* Setup WinPE for bootable USB * Setup WinPE for bootable USB
*/ */
// TODO: set FormatError
static BOOL SetupWinPE(char drive_letter) static BOOL SetupWinPE(char drive_letter)
{ {
char src[64], dst[32]; char src[64], dst[32];
@ -609,8 +607,9 @@ static BOOL SetupWinPE(char drive_letter)
// Create a copy of txtsetup.sif, as we want to keep the i386 files unmodified // Create a copy of txtsetup.sif, as we want to keep the i386 files unmodified
safe_sprintf(src, sizeof(src), "%c:\\%s\\txtsetup.sif", drive_letter, basedir[index]); safe_sprintf(src, sizeof(src), "%c:\\%s\\txtsetup.sif", drive_letter, basedir[index]);
safe_sprintf(dst, sizeof(dst), "%c:\\txtsetup.sif", drive_letter); safe_sprintf(dst, sizeof(dst), "%c:\\txtsetup.sif", drive_letter);
// TODO: detect if overwrite? if (!CopyFileA(src, dst, TRUE)) {
CopyFileA(src, dst, TRUE); uprintf("Did not copy %s as %s: %s\n", src, dst, WindowsErrorString());
}
if (insert_section_data(dst, "[SetupData]", setupsrcdev, FALSE) == NULL) { if (insert_section_data(dst, "[SetupData]", setupsrcdev, FALSE) == NULL) {
uprintf("Failed to add SetupSourceDevice in %s\n", dst); uprintf("Failed to add SetupSourceDevice in %s\n", dst);
goto out; goto out;
@ -620,8 +619,9 @@ static BOOL SetupWinPE(char drive_letter)
safe_sprintf(src, sizeof(src), "%c:\\%s\\setupldr.bin", drive_letter, basedir[index]); safe_sprintf(src, sizeof(src), "%c:\\%s\\setupldr.bin", drive_letter, basedir[index]);
safe_sprintf(dst, sizeof(dst), "%c:\\BOOTMGR", drive_letter); safe_sprintf(dst, sizeof(dst), "%c:\\BOOTMGR", drive_letter);
// TODO: detect if overwrite? if (!CopyFileA(src, dst, TRUE)) {
CopyFileA(src, dst, TRUE); uprintf("Did not copy %s as %s: %s\n", src, dst, WindowsErrorString());
}
// \minint with /minint option doesn't require further processing => return true // \minint with /minint option doesn't require further processing => return true
// \minint and no \i386 without /minint is unclear => return error // \minint and no \i386 without /minint is unclear => return error
@ -659,7 +659,6 @@ static BOOL SetupWinPE(char drive_letter)
uprintf("Patching file %s\n", dst); uprintf("Patching file %s\n", dst);
// Remove CRC check for 32 bit part of setupldr.bin from Win2k3 // Remove CRC check for 32 bit part of setupldr.bin from Win2k3
if ((size > 0x2061) && (buf[0x2060] == 0x74) && (buf[0x2061] == 0x03)) { if ((size > 0x2061) && (buf[0x2060] == 0x74) && (buf[0x2061] == 0x03)) {
// TODO: amend this if not all Win2k3 setupldr.bin's use the same header
buf[0x2060] = 0xeb; buf[0x2060] = 0xeb;
buf[0x2061] = 0x1a; buf[0x2061] = 0x1a;
uprintf(" 0x00002060: 0x74 0x03 -> 0xEB 0x1A (disable Win2k3 CRC check)\n"); uprintf(" 0x00002060: 0x74 0x03 -> 0xEB 0x1A (disable Win2k3 CRC check)\n");
@ -678,7 +677,7 @@ static BOOL SetupWinPE(char drive_letter)
// Additional setupldr.bin/bootmgr patching // Additional setupldr.bin/bootmgr patching
for (i=0; i<size-32; i++) { for (i=0; i<size-32; i++) {
// rdisk(0) -> rdisk(#) disk masquerading // rdisk(0) -> rdisk(#) disk masquerading
// TODO: only the first one seems to be needed // NB: only the first one seems to be needed
if (safe_strnicmp(&buf[i], rdisk_zero, strlen(rdisk_zero)-1) == 0) { if (safe_strnicmp(&buf[i], rdisk_zero, strlen(rdisk_zero)-1) == 0) {
buf[i+6] = 0x20 + ComboBox_GetCurSel(hDiskID); buf[i+6] = 0x20 + ComboBox_GetCurSel(hDiskID);
uprintf(" 0x%08X: '%s' -> 'rdisk(%c)'\n", i, rdisk_zero, buf[i+6]); uprintf(" 0x%08X: '%s' -> 'rdisk(%c)'\n", i, rdisk_zero, buf[i+6]);

View file

@ -311,6 +311,25 @@ static BOOL SetClusterSizes(int FSType)
return TRUE; return TRUE;
} }
// Convert a file size to human readable
static __inline char* size_to_hr(LARGE_INTEGER size)
{
int suffix = 0;
static char str_size[24];
const char* sizes[] = { "", "KB", "MB", "GB", "TB" };
double hr_size = (double)size.QuadPart;
while ((suffix < ARRAYSIZE(sizes)) && (hr_size >= 1024.0)) {
hr_size /= 1024.0;
suffix++;
}
if (suffix == 0) {
safe_sprintf(str_size, sizeof(str_size), "%d bytes", (int)hr_size);
} else {
safe_sprintf(str_size, sizeof(str_size), "%0.1f %s", hr_size, sizes[suffix]);
}
return str_size;
}
/* /*
* Fill the drive properties (size, FS, etc) * Fill the drive properties (size, FS, etc)
*/ */
@ -319,13 +338,14 @@ static BOOL GetDriveInfo(void)
BOOL r; BOOL r;
HANDLE hDrive; HANDLE hDrive;
DWORD size; DWORD size;
BYTE geometry[128], layout[1024]; BYTE geometry[128], layout[1024], part_type;
void* disk_geometry = (void*)geometry; void* disk_geometry = (void*)geometry;
void* drive_layout = (void*)layout; void* drive_layout = (void*)layout;
PDISK_GEOMETRY_EX DiskGeometry = (PDISK_GEOMETRY_EX)disk_geometry; PDISK_GEOMETRY_EX DiskGeometry = (PDISK_GEOMETRY_EX)disk_geometry;
PDRIVE_LAYOUT_INFORMATION_EX DriveLayout = (PDRIVE_LAYOUT_INFORMATION_EX)drive_layout; PDRIVE_LAYOUT_INFORMATION_EX DriveLayout = (PDRIVE_LAYOUT_INFORMATION_EX)drive_layout;
char DrivePath[] = "#:\\", tmp[128], fs_type[32]; char DrivePath[] = "#:\\", tmp[512], fs_type[32];
DWORD i, nb_partitions = 0; DWORD i, nb_partitions = 0;
int tmp_pos;
SelectedDrive.DiskSize = 0; SelectedDrive.DiskSize = 0;
@ -354,26 +374,23 @@ static BOOL GetDriveInfo(void)
r = FALSE; r = FALSE;
switch (DriveLayout->PartitionStyle) { switch (DriveLayout->PartitionStyle) {
case PARTITION_STYLE_MBR: case PARTITION_STYLE_MBR:
for (i=0; i<DriveLayout->PartitionCount; i++) { for (tmp_pos=0, i=0; (i<DriveLayout->PartitionCount)&&(tmp_pos>=0); i++) {
if (DriveLayout->PartitionEntry[i].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) { if (DriveLayout->PartitionEntry[i].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) {
uprintf("Partition #%d:\n", ++nb_partitions); nb_partitions++;
if (!r) { uprintf("Partition %d:\n", i+1);
// TODO: provide all partitions FS on tooltip, not just the one part_type = DriveLayout->PartitionEntry[i].Mbr.PartitionType;
safe_sprintf(tmp, sizeof(tmp), "Current file system: %s (0x%02x)", uprintf(" Type: %s (0x%02x)\n Size: %s\n Boot: %s\n Recognized: %s\n Hidden Sectors: %d\n",
GetPartitionType(DriveLayout->PartitionEntry[i].Mbr.PartitionType), GetPartitionType(part_type), part_type, size_to_hr(DriveLayout->PartitionEntry[i].PartitionLength),
DriveLayout->PartitionEntry[i].Mbr.PartitionType);
CreateTooltip(hFileSystem, tmp, -1);
r = TRUE;
}
uprintf(" Type: %s (0x%02x)\n Boot: %s\n Recognized: %s\n Hidden Sectors: %d\n",
GetPartitionType(DriveLayout->PartitionEntry[i].Mbr.PartitionType),
DriveLayout->PartitionEntry[i].Mbr.PartitionType,
DriveLayout->PartitionEntry[i].Mbr.BootIndicator?"Yes":"No", DriveLayout->PartitionEntry[i].Mbr.BootIndicator?"Yes":"No",
DriveLayout->PartitionEntry[i].Mbr.RecognizedPartition?"Yes":"No", DriveLayout->PartitionEntry[i].Mbr.RecognizedPartition?"Yes":"No",
DriveLayout->PartitionEntry[i].Mbr.HiddenSectors); DriveLayout->PartitionEntry[i].Mbr.HiddenSectors);
tmp_pos = safe_sprintf(&tmp[tmp_pos], sizeof(tmp)-tmp_pos, "Partition %d: %s (%s)\n",
i+1, GetPartitionType(part_type), size_to_hr(DriveLayout->PartitionEntry[i].PartitionLength));
} }
} }
uprintf("Partition type: MBR, NB Partitions: %d\n", nb_partitions); uprintf("Partition type: MBR, NB Partitions: %d\n", nb_partitions);
tmp[sizeof(tmp)-1] = 0;
CreateTooltip(hCapacity, tmp, -1);
break; break;
case PARTITION_STYLE_GPT: case PARTITION_STYLE_GPT:
uprintf("Partition type: GPT, NB Partitions: %d\n", DriveLayout->PartitionCount); uprintf("Partition type: GPT, NB Partitions: %d\n", DriveLayout->PartitionCount);
@ -587,6 +604,8 @@ BOOL CreatePartition(HANDLE hDrive)
DriveLayoutEx.PartitionEntry[0].PartitionStyle = PARTITION_STYLE_MBR; DriveLayoutEx.PartitionEntry[0].PartitionStyle = PARTITION_STYLE_MBR;
// TODO: CHS fixup (32 sectors/track) through a cheat mode, if requested // TODO: CHS fixup (32 sectors/track) through a cheat mode, if requested
// NB: disk geometry is computed by BIOS & co. by finding a match between LBA and CHS value of first partition // NB: disk geometry is computed by BIOS & co. by finding a match between LBA and CHS value of first partition
// ms-sys's write_partition_number_of_heads() and write_partition_start_sector_number() can be used if needed
DriveLayoutEx.PartitionEntry[0].StartingOffset.QuadPart = DriveLayoutEx.PartitionEntry[0].StartingOffset.QuadPart =
SelectedDrive.Geometry.BytesPerSector * SelectedDrive.Geometry.SectorsPerTrack; SelectedDrive.Geometry.BytesPerSector * SelectedDrive.Geometry.SectorsPerTrack;
sector_size = (SelectedDrive.DiskSize - DriveLayoutEx.PartitionEntry[0].StartingOffset.QuadPart) / SelectedDrive.Geometry.BytesPerSector; sector_size = (SelectedDrive.DiskSize - DriveLayoutEx.PartitionEntry[0].StartingOffset.QuadPart) / SelectedDrive.Geometry.BytesPerSector;
@ -1374,23 +1393,23 @@ void InitDialog(HWND hDlg)
SendMessage(GetDlgItem(hDlg, IDC_ADVANCED), BCM_SETIMAGELIST, 0, (LPARAM)&bi_down); SendMessage(GetDlgItem(hDlg, IDC_ADVANCED), BCM_SETIMAGELIST, 0, (LPARAM)&bi_down);
// Set the various tooltips // Set the various tooltips
CreateTooltip(hCapacity, "Size of the current USB drive", -1); CreateTooltip(hFileSystem, "Sets the target filesystem", -1);
CreateTooltip(hClusterSize, "Minimum size that each data block will occupy", -1); CreateTooltip(hClusterSize, "Minimum size that each data block occupies", -1);
CreateTooltip(hLabel, "Use this field to set the drive label\nInternational characters are accepted", -1); CreateTooltip(hLabel, "Use this field to set the drive label\nInternational characters are accepted", -1);
CreateTooltip(GetDlgItem(hDlg, IDC_ADVANCED), "Toggle advanced options", -1); CreateTooltip(GetDlgItem(hDlg, IDC_ADVANCED), "Toggle advanced options", -1);
CreateTooltip(GetDlgItem(hDlg, IDC_BADBLOCKS), "Test the device for bad blocks using a set byte pattern", -1); CreateTooltip(GetDlgItem(hDlg, IDC_BADBLOCKS), "Test the device for bad blocks using a set byte pattern", -1);
CreateTooltip(GetDlgItem(hDlg, IDC_QUICKFORMAT), "Unchek this box to use the \"slow\" format method", -1); CreateTooltip(GetDlgItem(hDlg, IDC_QUICKFORMAT), "Unchek this box to use the \"slow\" format method", -1);
CreateTooltip(hDOS, "Check this box to make the USB drive bootable", -1); CreateTooltip(hDOS, "Check this box to make the USB drive bootable", -1);
CreateTooltip(hDOSType, "Type of boot", -1); CreateTooltip(hDOSType, "Boot method", -1);
CreateTooltip(hSelectISO, "Click to select an ISO...", -1); CreateTooltip(hSelectISO, "Click to select an ISO...", -1);
CreateTooltip(GetDlgItem(hDlg, IDC_SET_ICON), "Check this box to allow the display of international labels " CreateTooltip(GetDlgItem(hDlg, IDC_SET_ICON), "Check this box to allow the display of international labels "
"as well as set a device icon (through autorun.inf)", 10000); "and set a device icon (creates an autorun.inf)", 10000);
CreateTooltip(GetDlgItem(hDlg, IDC_RUFUS_MBR), "Install an MBR that allows boot selection and can masquerade the BIOS USB drive ID", 10000); CreateTooltip(GetDlgItem(hDlg, IDC_RUFUS_MBR), "Install an MBR that allows boot selection and can masquerade the BIOS USB drive ID", 10000);
CreateTooltip(hDiskID, "Try to masquerade first bootable USB drive (usually 0x80) as a different disk.\n" CreateTooltip(hDiskID, "Try to masquerade first bootable USB drive (usually 0x80) as a different disk.\n"
"This should only be necessary for XP installation" , 10000); "This should only be necessary for XP installation" , 10000);
CreateTooltip(GetDlgItem(hDlg, IDC_EXTRA_PARTITION), "Create an extra hidden partition and try to align partitions boundaries.\n" CreateTooltip(GetDlgItem(hDlg, IDC_EXTRA_PARTITION), "Create an extra hidden partition and try to align partitions boundaries.\n"
"This can improve boot detection for older BIOSes", -1); "This can improve boot detection for older BIOSes", -1);
CreateTooltip(GetDlgItem(hDlg, IDC_START), "Format the drive. This will DESTROY any data on it", -1); CreateTooltip(GetDlgItem(hDlg, IDC_START), "Start the formatting operation.\nThis will DESTROY any data on the target!", -1);
CreateTooltip(GetDlgItem(hDlg, IDC_ABOUT), "Licensing information and credits", -1); CreateTooltip(GetDlgItem(hDlg, IDC_ABOUT), "Licensing information and credits", -1);
ToggleAdvanced(); // We start in advanced mode => go to basic mode ToggleAdvanced(); // We start in advanced mode => go to basic mode

View file

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 316 IDD_DIALOG DIALOGEX 12, 12, 206, 316
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.2.0.177" CAPTION "Rufus v1.2.0.178"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14 DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
@ -76,7 +76,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL,
"SysLink",WS_TABSTOP,46,47,114,9 "SysLink",WS_TABSTOP,46,47,114,9
LTEXT "Version 1.2.0 (Build 177)",IDC_STATIC,46,19,78,8 LTEXT "Version 1.2.0 (Build 178)",IDC_STATIC,46,19,78,8
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
@ -221,8 +221,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,0,177 FILEVERSION 1,2,0,178
PRODUCTVERSION 1,2,0,177 PRODUCTVERSION 1,2,0,178
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -239,13 +239,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "akeo.ie" VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.2.0.177" VALUE "FileVersion", "1.2.0.178"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.2.0.177" VALUE "ProductVersion", "1.2.0.178"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -55,7 +55,6 @@ int libfat_readfile(intptr_t pp, void *buf, size_t secsize,
!ReadFile((HANDLE) pp, buf, (DWORD)secsize, &bytes_read, NULL) || !ReadFile((HANDLE) pp, buf, (DWORD)secsize, &bytes_read, NULL) ||
bytes_read != secsize) { bytes_read != secsize) {
uprintf("Cannot read sector %u\n", sector); uprintf("Cannot read sector %u\n", sector);
// TODO -1?
return 0; return 0;
} }