-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write invalid GPT header before writing entries
Once the entries are safely on disk, overwrite the invalid header (all zeros) with a valid one. This ensures that there is never a valid header with the new sector size and incompletely written entries, even in the case of a CRC32 collision. However, it provides no guarantees about the old header. A future commit will clobber that, too, either by replacing it and the protective MBR with a correct protective MBR followed by zeroes or by replacing the backup GPT header with zeroes.
- Loading branch information
Showing
1 changed file
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters