[format] fixed corruption issue when MBR is garbage

* after a bb check, MBR could become garbage
* when that occurs, Windows might interpret a bad partition table and prevent MBR from being properly written
* force a complete zeroing of the whole MBR before partitioning to fix this
* also added error code for bb
This commit is contained in:
Pete Batard 2011-12-06 18:11:38 +00:00
parent 5c2242beaa
commit 480986b0ae
7 changed files with 39 additions and 7 deletions

View file

@ -192,6 +192,8 @@ const char* StrError(DWORD error_code)
return "Cancelled by user";
case ERROR_CANT_START_THREAD:
return "Unable to create formatting thread";
case ERROR_BADBLOCKS:
return "Bad blocks detected";
default:
uprintf("StrError: hit default - %08X\n", error_code);
SetLastError(error_code);