badblocks.c (rufus-3.12) | : | badblocks.c (rufus-3.13) | ||
---|---|---|---|---|
skipping to change at line 411 | skipping to change at line 411 | |||
if (got & 511) | if (got & 511) | |||
uprintf("%sWeird value (%ld) in do_write\n", bb_prefix, got); | uprintf("%sWeird value (%ld) in do_write\n", bb_prefix, got); | |||
got /= block_size; | got /= block_size; | |||
return got; | return got; | |||
} | } | |||
static unsigned int test_rw(HANDLE hDrive, blk64_t last_block, size_t block_size , blk64_t first_block, | static unsigned int test_rw(HANDLE hDrive, blk64_t last_block, size_t block_size , blk64_t first_block, | |||
size_t blocks_at_once, in t pattern_type, int nb_passes) | size_t blocks_at_once, in t pattern_type, int nb_passes) | |||
{ | { | |||
const unsigned int pattern[BADLOCKS_PATTERN_TYPES][BADBLOCK_PATTERN_COUNT ] = | const unsigned int pattern[BADLOCKS_PATTERN_TYPES][BADBLOCK_PATTERN_COUNT ] = | |||
{ BADBLOCK_PATTERN_SLC, BADCLOCK_PATTERN_MLC, BADBLOCK_PATTERN_TL | { BADBLOCK_PATTERN_ONE_PASS, BADBLOCK_PATTERN_TWO_PASSES, BADBLOC | |||
C }; | K_PATTERN_SLC, | |||
BADCLOCK_PATTERN_MLC, BADBLOCK_PATTERN_TLC }; | ||||
unsigned char *buffer = NULL, *read_buffer; | unsigned char *buffer = NULL, *read_buffer; | |||
int i, pat_idx; | int i, pat_idx; | |||
unsigned int bb_count = 0; | unsigned int bb_count = 0; | |||
blk64_t got, tryout, recover_block = ~0, *blk_id; | blk64_t got, tryout, recover_block = ~0, *blk_id; | |||
size_t id_offset = 0; | size_t id_offset = 0; | |||
if ((pattern_type < 0) || (pattern_type >= BADLOCKS_PATTERN_TYPES)) { | if ((pattern_type < 0) || (pattern_type >= BADLOCKS_PATTERN_TYPES)) { | |||
uprintf("%sInvalid pattern type\n", bb_prefix); | uprintf("%sInvalid pattern type\n", bb_prefix); | |||
cancel_ops = -1; | cancel_ops = -1; | |||
return 0; | return 0; | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added |