mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-31 23:08:26 -04:00
[misc] various small improvements
* Less scary message from bad blocks * Better error report for read/write_sectors * Fix a WDK warning
This commit is contained in:
parent
261834e31f
commit
8dc5429d9f
5 changed files with 11 additions and 9 deletions
|
@ -48,6 +48,7 @@ int64_t write_sectors(HANDLE hDrive, uint64_t SectorSize,
|
|||
if((!WriteFile(hDrive, pBuf, Size, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
{
|
||||
uprintf("write_sectors: Write error - %s\n", WindowsErrorString());
|
||||
uprintf(" Wrote: %d, Expected: %d\n", Size, nSectors*SectorSize);
|
||||
uprintf(" StartSector:%0X, nSectors:%0X, SectorSize:%0X\n", StartSector, nSectors, SectorSize);
|
||||
return Size;
|
||||
}
|
||||
|
@ -80,6 +81,7 @@ int64_t read_sectors(HANDLE hDrive, uint64_t SectorSize,
|
|||
if((!ReadFile(hDrive, pBuf, Size, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
{
|
||||
uprintf("read_sectors: Read error - %s\n", WindowsErrorString());
|
||||
uprintf(" Read: %d, Expected: %d\n", Size, nSectors*SectorSize);
|
||||
uprintf(" StartSector:%0X, nSectors:%0X, SectorSize:%0X\n", StartSector, nSectors, SectorSize);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue