[badblocks] use 0x55 and 0xAA for less than 2 passes checks

* Should be more effective at detecting errors than 0x00 and 0xFF.
This commit is contained in:
Pete Batard 2020-11-10 17:24:52 +00:00
parent f8c951f3d7
commit 9c71ac25d5
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
5 changed files with 14 additions and 12 deletions

View file

@ -408,7 +408,8 @@ static unsigned int test_rw(HANDLE hDrive, blk64_t last_block, size_t block_size
size_t blocks_at_once, int pattern_type, int nb_passes)
{
const unsigned int pattern[BADLOCKS_PATTERN_TYPES][BADBLOCK_PATTERN_COUNT] =
{ BADBLOCK_PATTERN_SLC, BADCLOCK_PATTERN_MLC, BADBLOCK_PATTERN_TLC };
{ BADBLOCK_PATTERN_ONE_PASS, BADBLOCK_PATTERN_TWO_PASSES, BADBLOCK_PATTERN_SLC,
BADCLOCK_PATTERN_MLC, BADBLOCK_PATTERN_TLC };
unsigned char *buffer = NULL, *read_buffer;
int i, pat_idx;
unsigned int bb_count = 0;