diff options
author | Rod Smith <rodsmith@rodsbooks.com> | 2017-07-27 21:59:14 -0400 |
---|---|---|
committer | Rod Smith <rodsmith@rodsbooks.com> | 2017-07-27 21:59:14 -0400 |
commit | f1f6236fb44392bfe5673bc3889a2b17b1696b90 (patch) | |
tree | ff9f7c2adbb485e0490ce6f35fae72829296e866 /gpt.cc | |
parent | eed1122809cb7c509e808c1e76853af23f8652c8 (diff) | |
download | sgdisk-f1f6236fb44392bfe5673bc3889a2b17b1696b90.tar.gz |
Fixed a major bug that caused improper partition tables to be created.
Version 1.0.3 release.
Diffstat (limited to 'gpt.cc')
-rw-r--r-- | gpt.cc | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1924,6 +1924,7 @@ int GPTData::ClearGPTData(void) { mainHeader.currentLBA = UINT64_C(1); mainHeader.partitionEntriesLBA = (uint64_t) 2; mainHeader.sizeOfPartitionEntries = GPT_SIZE; + mainHeader.firstUsableLBA = GetTableSizeInSectors() + mainHeader.partitionEntriesLBA; for (i = 0; i < GPT_RESERVED; i++) { mainHeader.reserved2[i] = '\0'; } // for |