[ntfs] add bootable NTFS support

* NTFS boot records in ms-sys
* also added debug duplication to PrintMessage
* also fixed controls staying enabled during formatting
This commit is contained in:
Pete Batard 2012-02-03 18:19:50 +00:00
parent bb0c0ecb1c
commit d1e4ba278b
17 changed files with 534 additions and 47 deletions

View file

@ -324,7 +324,7 @@ static void print_status(void)
percent = calc_percent((unsigned long) currently_testing,
(unsigned long) num_blocks);
percent = (percent/2.0f) + ((cur_op==OP_READ)? 50.0f : 0.0f);
PrintStatus(0, "Bad Blocks: PASS %d/%d - %0.2f%% (%d/%d/%d errors)",
PrintStatus(0, FALSE, "Bad Blocks: PASS %d/%d - %0.2f%% (%d/%d/%d errors)",
cur_pattern, nr_pattern,
percent,
num_read_errors,
@ -355,8 +355,7 @@ static void pattern_fill(unsigned char *buffer, unsigned int pattern,
for (ptr = buffer; ptr < buffer + n; ptr++) {
(*ptr) = rand() % (1 << (8 * sizeof(char)));
}
PrintStatus(3500, "Bad Blocks: Testing with random pattern.");
uprintf("Bad Blocks: Testing with random pattern.");
PrintStatus(3500, TRUE, "Bad Blocks: Testing with random pattern.");
} else {
bpattern[0] = 0;
for (i = 0; i < sizeof(bpattern); i++) {
@ -373,8 +372,7 @@ static void pattern_fill(unsigned char *buffer, unsigned int pattern,
else
i--;
}
PrintStatus(3500, "Bad Blocks: Testing with pattern 0x%02X.", bpattern[i]);
uprintf("Bad Blocks: Testing with pattern 0x%02X.", bpattern[i]);
PrintStatus(3500, TRUE, "Bad Blocks: Testing with pattern 0x%02X.", bpattern[i]);
cur_pattern++;
}
}