Skip to content

Commit

Permalink
first LBA is always from start of disk (#181)
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Deitcher <[email protected]>
  • Loading branch information
deitch authored Apr 28, 2023
1 parent e29f8c4 commit d57a597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion partition/gpt/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (t *Table) toGPTBytes(primary bool) ([]byte, error) {
copy(b[56:72], bytesToUUIDBytes(guid[0:16]))

// starting LBA of array of partition entries
binary.LittleEndian.PutUint64(b[72:80], t.partitionArraySector(primary))
binary.LittleEndian.PutUint64(b[72:80], t.partitionArraySector(true))

// how many entries?
binary.LittleEndian.PutUint32(b[80:84], uint32(t.partitionArraySize))
Expand Down

0 comments on commit d57a597

Please sign in to comment.