disk: remove updateRootPartition

The previous commit made sure that `PartitionTable.RootPartition`
is indeed returning the pointer partition object inside the array
of the `PartitionTable`. Thus changes to the returned object will
now directly affect the object and thus there is no need to call
`PartitionTable.updateRootPartition` anymore.
This commit is contained in:
Christian Kellner 2021-11-09 15:44:29 +00:00 committed by Tom Gundersen
parent 6333d54091
commit 147e0c966b
2 changed files with 0 additions and 5 deletions

View file

@ -60,7 +60,6 @@ func CreatePartitionTable(
rootPartition := basePartitionTable.RootPartition()
rootPartition.Size = ((imageSize / sectorSize) - start - 100)
rootPartition.Filesystem.UUID = uuid.Must(newRandomUUIDFromReader(rng)).String()
basePartitionTable.updateRootPartition(*rootPartition)
return basePartitionTable
}

View file

@ -214,10 +214,6 @@ func (pt *PartitionTable) updatePartitionStartPointOffsets(start uint64) uint64
return start
}
func (pt *PartitionTable) updateRootPartition(rootPartition Partition) {
pt.Partitions[pt.RootPartitionIndex()] = rootPartition
}
func (pt *PartitionTable) getPartitionTableSize() uint64 {
var size uint64
for _, p := range pt.Partitions {