mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -04:00
[bb] bad blocks check improvement
* Use a default block size of 128 KB (can speed up read operations) * Reorganise patterns to suit different types of NAND cells (SLC, MLC and TLC) * Only run fake drive test on first pass * Also update rufus-next to 3.2
This commit is contained in:
parent
d4a4506b16
commit
2d262df8f3
12 changed files with 121 additions and 94 deletions
|
@ -1783,6 +1783,7 @@ DWORD WINAPI FormatThread(void* param)
|
|||
|
||||
if (IsChecked(IDC_BAD_BLOCKS)) {
|
||||
do {
|
||||
int sel = ComboBox_GetCurSel(hNBPasses);
|
||||
// create a log file for bad blocks report. Since %USERPROFILE% may
|
||||
// have localized characters, we use the UTF-8 API.
|
||||
userdir = getenvU("USERPROFILE");
|
||||
|
@ -1801,8 +1802,8 @@ DWORD WINAPI FormatThread(void* param)
|
|||
fflush(log_fd);
|
||||
}
|
||||
|
||||
if (!BadBlocks(hPhysicalDrive, SelectedDrive.DiskSize, SelectedDrive.SectorSize,
|
||||
ComboBox_GetCurSel(hNBPasses)+1, &report, log_fd)) {
|
||||
if (!BadBlocks(hPhysicalDrive, SelectedDrive.DiskSize, (sel >= 2) ? 4 : sel +1,
|
||||
(sel < 2) ? 0 : sel - 2, &report, log_fd)) {
|
||||
uprintf("Bad blocks: Check failed.\n");
|
||||
if (!IS_ERROR(FormatStatus))
|
||||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_BADBLOCKS_FAILURE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue