mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-22 02:45:11 -04:00
[core] improve write retry handling
* Add a proper delay before retrying a write operation and increase retry count to 4 * Add retries when clearing boot records or when zeroing a drive * Also improve log output from USB device reset
This commit is contained in:
parent
3ba7c9eab0
commit
5ab67c03d6
6 changed files with 70 additions and 37 deletions
|
@ -141,8 +141,10 @@ BOOL ResetDevice(int index)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (DriveHub.String[index] == NULL)
|
||||
if (DriveHub.String[index] == NULL) {
|
||||
uprintf("The device you are trying to reset does not appear to be a USB device...");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
LastReset = GetTickCount64();
|
||||
|
||||
|
@ -162,6 +164,7 @@ BOOL ResetDevice(int index)
|
|||
uprintf(" Failed to cycle port: %s", WindowsErrorString());
|
||||
goto out;
|
||||
}
|
||||
uprintf("Please wait for the device to re-appear...");
|
||||
r = TRUE;
|
||||
|
||||
out:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue