From d57a5974ed2d1619bed43e854717acd1b30eef4e Mon Sep 17 00:00:00 2001 From: Avi Deitcher Date: Fri, 28 Apr 2023 12:59:17 +0300 Subject: [PATCH] first LBA is always from start of disk (#181) Signed-off-by: Avi Deitcher --- partition/gpt/table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partition/gpt/table.go b/partition/gpt/table.go index 0da5dde1..bbea768d 100644 --- a/partition/gpt/table.go +++ b/partition/gpt/table.go @@ -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))